Is it possible to get the minimal trace to trace information on an existing PCB with automation?
You should do the check layer per layer
the getactual command is the same as if you would use the measure minimum command so if you measure between 2 traces that cross eachother on different layers you will get 0mm clearance.
You can use the GetActualMinClearance method, passing in the two trace objects, to get the minimum distance between the traces.
Thanks - I tried that but ...
I want to the get the minimal distance on the whole board for the trace to trace.
Is there a method to get this information more easy?
Not that I know of. You would need to loop over every trace, to every other trace, on each layer, to get the minimum distance between every trace.
To get the minimum clearance rule (constraint) instead of actual minimum distance, you could use the Clearance.GetNetClearanceRuleByType method, or use CES automation to get the minimum trace-to-trace constraint.
I do following:
For Each NetComp1 In pcbDoc.Traces
For Each NetComp2 in pcbDoc.Traces
if NetComp1.Name <> NetComp2.Name then
f1.WriteLine(" Clearance ?!?: " & ClearanceObj.GetActualMinClearance(NetComp1, NetComp2, epcbUnitMM ) & " ... " & NetComp1.Name & " <-> " & NetComp2.Name )
This is not really high performance but it does something.
I get following output (snippet):
Clearance ?!?: 0 ... $1N60 <-> I2DAT_INT
Clearance ?!?: 0 ... $1N60 <-> 3V3-D
Clearance ?!?: 0 ... $1N61 <-> $1N62
Clearance ?!?: 0,000571 ... cfg_tsec2_prtc <-> USB_DIR
Outputs are in (mm) but what the hell is "0" for clearance of trace to trace ....
I would expect like shown in the picture 0.1 mm .....
What is a trace ????
In my opinon it is a peace of an electrical net.
Thank you - I did what you said ....
For Layer_tmp = 1 to pcbDoc.LayerCount step 1
MinClearanceLayer = 99
For Each NetComp1 In pcbDoc.Nets
For Each NetComp2 in pcbDoc.Nets
if NetComp1.Name <> NetComp2.Name then
if ( ClearanceObj.GetNetClearanceRuleByType( epcbClearanceTrace, NetComp1, Layer_tmp, epcbClearanceTrace, NetComp2, Layer_tmp, "(Master)", epcbUnitMM) < MinClearanceLayer) then
MinClearanceLayer = ClearanceObj.GetNetClearanceRuleByType( epcbClearanceTrace, NetComp1, Layer_tmp, epcbClearanceTrace, NetComp2, Layer_tmp, "(Master)", epcbUnitMM)
NetStr1 = NetComp1.Name
NetStr2 = NetComp2.Name
Now it works as expected ;-)
Thank you very much
Use HyperLynx DRC, it is awsome for doing this and has all the data ready for you....
Transmission Line Info
Coupled Nets Info
Great - but to access CES automation in EE7.9.3 or higher?
CES automation has been disabled for all users?!?
This aren't pictures of CES data, they are pictures from HyperLynx DRC. You hit Export to HyperLynx DRC in Expedition and you can get the actual routed trace coupling and transmission lines. In HyperLynx DRC 6.1 it will have a field solver that you can do Impedance checks.... HyperLynx DRC is an add-on that you can use out of the BOX EMI/PI/SI rules. I added this post becasue I was trying to write automation for something like this in Expedition and I hit the wall. HypDRC has automation and you can write whatever rules you want but more from an electrical viewpoint of the design data.
You can check it out here: http://www.mentor.com/products/pcb-system-design/circuit-simulation/hyperlynx-drc-emi-emc
Thank you for your answer - but this will add extra costs to our budget. This is currently a no go.
I have written a script - shown attached which delivers some statistics from the PCB.
Our PCB assembler wants to know that - most points could be taken from report writer - but since report writer does not support everything I wrote the script.
The output language is in "German".
Nice script Wolfgang - I like it... but I'd add some more information concerning the minimum clearance of cooper objects - trace to pad, trace to SMD pad, Trace to plane and so on. And then the minimum of them at the end.
Basically usefull script - Great!
Retrieving data ...