Quantcast
Channel: Mentor Graphics Communities: Message List
Viewing all articles
Browse latest Browse all 4541

Re: appPED = CreateObject("MGCPCBLibraries.PartsEditorDlg") in VX not work?

$
0
0

You will need to make some changes to the way your scripts work.  There is now a big push to enable automation tools to reference multiple installed versions of the Mentor software on the fly.  This is done by way of a COM version system.  The COM version should be available by way of an environment variable, and your automation will need to get this value every time it starts in order to apply it to the different application startups such as your CreateObject statement above.

 

More information on this can be found in the help.  Under Automation and Scripting, find the Common Automation Reference.  Look at chapter 2 of that, Scripting with Multiple Installs. There are some examples there on how to do it. 

 

You will also need to change the references in your project to many of the dlls.  They are now in a different location, not in the Mentor install tree.  So in your project, you will delete the references and then add them back again.  This will incorporate the new path of the referenced objects. 

 

CellEditorAddin

MGCPCB

MGCPCBEngines

MGCPCBPartsEditor

All the Variant Manager references

ViewDraw

 

All these need to be changed.  Perhaps some more which I've forgotten about.

 

Next you will discover that even after you add the COM version suffix to the CreateObject statement, the PartsEditor will still not work.

 

I encountered this problem with all of the PCB Engines. And the PartEditor. All failed in exactly the same way.  I put in SR's with Mentor, exchanged a bunch of emails back and forth to resolve the problem, and got nowhere.  I was told that it was a problem with the way I installed the software.  Which is odd, since all I do is run the standard Mentor Install program with default settings and it does all the rest.  If there was a problem with how this was installed, I have no way of knowing what to do differently, since I control almost nothing about it.   These scripts all worked perfectly fine in 7.9.4, and in VX they do not.

 

The second problem you will run into is that the Mentor AE will not look at your code.  They do not debug customer automation code.  All you can do is tell them what function failed and what arguments you used with it.  So don't bother sending them your code.

 

What I did to solve some of the problem was to start the PCB Engines with a vbscript that I run from inside my VB.net program.  That works.  I have no idea why the same function works from vbscript but not from VB.net. I suspect that there is something in the COM that they do not yet know about that is not quite right.  The AE I worked with assured me that it had all be tested and that the COM was certainly not the problem.  Unfortunately I do not know of a way to run the Parts Editor from a script and have it interact with .net, so you are going to be a bit stuck there until this gets resolved.

 

I have waited to raise these issues here until someone other than me has encountered the same problem. I encourage you to start your own SR's and report back what you find.  Anyone else with the same issues should also chime in and put in their own SR's, so that we can get this problem looked at by the engineering team at Mentor. 


Viewing all articles
Browse latest Browse all 4541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>