Quantcast
Channel: Cadence PCB Design Forum
Viewing all articles
Browse latest Browse all 5525

Variant Mode in TCL scripting

$
0
0
Hello there, 

For several months now, my mission is to create TCL / Tk scripts in OrCAD Capture to have new tools to automate various tasks related to the design of schematics. However, today I am facing a problem on one of my scripts. 

The goal of the script: This script has the specific objective of creating a "manufacture file" in relation to an OrCAD Capture design. This one allows to find out information on all components of a same design that will be useful in the manufacture of the card. Today, I can well retrieve all the necessary informations on all the components of my design. 

How it works: My script path all the design and retrieve various properties of all instances and occurrences. 

The problem: As we use "Variant Mode", it happens that some components become unmounted (gray on the design). In this case we wouldn't want them to appear in the "manufacture file". And here is my problem, I can't recover through TCL commands any information that would allow me to deduct my component is unmounted, allowing me to make sure it is not treated. 

I already know the documentation "OrCAD Capture TCL / Tk Extensions" which contains various commands available but I haven't found one that might interest me. 

The tracks I'm trying to explore without success: 
  •  When a component is unmounted and I look at its Orcad properties (double-click), some values ​​appear in "NC" and if the component is mounted another value appears. I can well recover the values ​​associated with all properties of the components, but I don't get the "NC" value when the component is unmounted. I get the same value that if the component was mounted. 
  • In the same way, I try to retrieve the color symbol for each component (the mounted component appears in blue and unmounted in gray). But again, if the component is mounted or not I always gets the same color code (48). 
  • Finally, I found a function "IsActiveVariant ()" in the guide "OrCAD Capture TCL / Tk Extensions". This feature seems to be interesting if I could apply it to my instance (or occurrence) and it turned me if the component is "active" or not used in the current variant mode. Unfortunately, I did not manage to make it work because it is applied to an object of type "CISVariantPartOBJ (CISBase)" and I don't know how to get. 
So, I can't differentiate a mounted an unmounted component by these methods. Can you give me your help?
I hope that I was clear enough on explaining my problem and I am at your disposal for any further information. 

Best regards.

Viewing all articles
Browse latest Browse all 5525

Trending Articles