Is there a way to utilize the crossprobing capabilities between CES and DxDesigner using automation? (In expedition)
Are you using the CES and DxDesigner of which version?
The DxD2007.X and CES can use the Cross Probe function.
The version I'm working on is 2007.8.
What I'm trying to do is this:
I have an application that has all the design data in memory (nets and comps) extracted from CES and I want to have cross probing ability from my application to dxdesigner.
I would a appreciate if you could add some code lines that demonstrate how to use the cross prob from CES to DxDesigner.
You have to open a sheet to select Net or Component in DxDesigner by Automation.
In order to open a sheet by Automation, a schematic name and a sheet name are required.
Are the schematic name and the sheet name included in your information?
I don't have the data you mentioned.
I'll try and explain again what I have and what I want to accomplish.
I would like to connect to CES by automation, extract all the nets and comps data and upload it in my application.
When a user will choose a net/comp in my application I want it to be selected in DxDesigner.
I assume that this is possible, since it's possible when I'm in the CES application.
Please use SelectObj method to select an object in CES. "ElectNet" is the object type which should be selected. The other object types can be found in the documentation.
1) The object (row) will be selected.
2) The constraint field will be selected.
In addition to Robert's recommendation, I can provide some details about opening CES.
Connecting to CES is a little different than connecting to other applications, because the design context must be supplied before calling CreateObject.
This is done with an environment variable, CES_AUTOMATION_CMD, which supplies the command line arguments that are used when the CES application is invoked.
Attached you will find a small script form that can be opened from DxDesigner using the File -> Open -> File menu, and browse to the CESProbe.efm file.
There is a combo box that shows all the designs in the current project, select the top-level design and click the Open CES button. The script assembles the command line, calls CreateObject("Ces.Application"), and enables cross-probing (CES.XprobeMode = True).
The list box will show all the electrical nets in the design, when a net name is double-clicked, the script calls the SelectObj method to cross-probe to DxDesigner.
When the script form is closed, the CES application is terminated.
Attempting to attach file
Hi Navit-san and John-san,
I think that Sub TheView_EventInitialize() becomes the following codes.
To select the component, I changed.
Satoru Thank you very much for your addition.
Hi Satoru-san, John-san,
when I run the efm (CESProbe2.zip) I get a run time error:
<Object: "TheView",Event: "EventInitialize", Line 3>
Type mismatch: 'GetProjectData'
Line 3 is: Set projdata = GetProjectData()
I opened the efm within CES with a VBDC project.
The script form can only be run from DxDesigner. The script form open CES in the background, and uses the CES automation interface to cross-probe to nets and components in DxDesigner.
This efm acquires some informations from DxDesigner.
Therefore, it can't use it by the DC flow.
Moreover, DC and CES can't connect in the cross probe as John says.
Expedition is necessary to connect it.
Hi John-san, Satoru-san,
DC has no automation but there is cross-probing between DC and CES.
Is it possible to run automation in the CES environment and supply the needed information such as path, root of design, (anything else?) with a form?
Another question, is it possible to get this information from the Expedition?
CES and DC haven't a cross probe function.
If you need it, please register to the Mentor Idea.
Automation can't make because DC and CES haven't a function.
This information (RefDes, Net) can get from Expedition.
DC and CES do have cross probing.
It doesn't make sense to use ExpeditionPCB for this data at least because of licensing price.
Please teach your version.
2007.8 DC, CES, Expedition, WinXP
John, Thank you very much
The script was very helpful. Now I have full crossprobing from my application to the design.
It seems that CES should be open in the background.isn't it?
One small question regarding CES. How can I extract the data in the other columns.
For example in the Part sheet, I would like to read the Hierarchical Path.
Yes, CES is running in the background, and can be made visible by setting the Visible property to True, if you would like.
You can get the constraints through the CES automation interface, where the interface to the database is the ObjectDefs property on the CES tool object.
Since the hierarchical path is on a pin in the Parts page, you can do this:
Set cesdb = CES.Tools("CES").ObjectDefs
Set objPin = cesdb.Sheets("PART").FindObject(sPinName)
sHierPath = objPin.ConstraintEx("PATH")
If you want to get the pins from the electrical net, you can do this:
Set objNet = cesdb.Design.GetElecNet(sNetName)
For Each objPin on objNet.Pins
sHierPath = objPin.CompPin.Object.ConstraintEx("PATH")
Thank you very much. Your information helps me very much.
I have one more question, and I hope that by that I will get all the data I need.
Is there a way to get the connectivity of the design from the CES?
Yes, you can get the design connectivity from the CES automation interface.
In the previous example, I showed how to get all the pins on the electrical net.
Thank you very much, I found the data I needed.
There is only one thing I can't figure out about the nets, and it's the GLOBAL ones.
How do I get them and their connectivity?
You can use the Design.GetPowerNets method to get a collection of the "global" nets.
I noticed an error in the documentation, though. The documentation indicates that the method returns a collection of strings (ICmsStrings), but it really returns a collection of net objects (ICmsNets).
The example is correct, though, it shows that you have to get the .Name property of the net.
You can get the pins on the global nets by accessing the Pins property:
For Each pwrnet in CES.ObjectDefs.Design.GetPowerNets(0)
For Each pwrpin in pwrnet.Pins
For some reason, the Pins collection is empty for "non-routed" power nets (those with the Visible option unchecked in Power & Grounds Settings dialog).
Thanks, everything is working fine.
Regarding the routing, is there a way to change all the power nets to be routed automaticly by automation or set some global setting in the CES application? I'm trying to depend on CES for the connectivity, and If I can't get it for global nets it's kind of a problem.
You can use the Design.PowerNetToPhysNet and Design.PhysNetToPowerNet methods to force the power net to be routable, like this:
For Each pwrNet In CES.ObjectDefs.Design.GetPowerNets(0) If pwrNet.Object.ConstraintEx("ROUTABLE") = 0 Then CES.ObjectDefs.Design.PowerNetToPhysNet pwrNet.Name CES.ObjectDefs.Design.PhysNetToPowerNet pwrNet.Name, "0", 1 End If For Each pwrPin in pwrNet.Pins
I ran the code and it worked.
The line - "If pwrNet.Object.ConstraintEx("ROUTABLE") = 0 Then" didn't worked. It throws an error.
I tried to find the ROUTABLE constrains in the constrains definition and I couldn't found it.
Also, can you explain to me what is the meaning of the routable property? I couldn't find any documentation about it.
What error message are you getting? And which release are you using?
The ROUTABLE constraint is not displayed in the Constraint Definitions dialog because it is used only for power nets, which are only displayed in the Settings dialog.
For some reason, the problem was solved. I didn't change anything, but after the weekend the same code ran without ant errors.
Thank you for your help.
I have a question about the power nets.
Before I switch from Power net to physical net, I want to save the voltage value so it want be lost.
I couldn't found any constrains or property that could help me with extracting this value.
Could you please advise.
The constraint is "SUPPLY_VOLTAGE":
sVoltage = pwrNet.Object.ConstraintEx("SUPPLY_VOLTAGE")
Is there a way to get a list of all available constrains?
The only place I know of is the constrains definition form (from the edit menu), but I couldn't find the power_supply and the routable constrain in that list.
Apparently, The error message I got didn't really disappeared, it's just depend on the project I opened.
I couldn't found any major differences between the design that it worked and the ones that it didn't worked (It's didn't worked in more than one design).
I attached a print screen of the error I get, both in vbscript and in vb.net.
Another problem connected to the same code.
When I'm running the same code under vb.net I get an error message when I try to use the function PowerNetToPhysNet.
I also attached a print screen of this error.
Hope you could help me with those problems.
Retrieving data ...