• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. PCB Design
  3. Resources for Tcl programming with DE/Orcad CIS...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 164
  • Views 2621
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Resources for Tcl programming with DE/Orcad CIS...

Robert Finley
Robert Finley over 7 years ago

Have a question and am not getting any emails from orcad_scripting at Cadence.  Is that support service still active?

Accessing groups and stuffing status in CIS is super nice but I'm struggling with the example they have.

Need to figure out how to use the CIS part list report example to change a user property string (mangle PART_NUMBER to break the CIS link).. 

  • Cancel
  • Robert Finley
    Robert Finley over 7 years ago

    For instance, pdf documentation is a bit scattered.  But, the PDF "OrCAD Capture TclTk Extensions.pdf" has an example:

    But, the CIS report code has:

    I actually understand that DboState is a group of parts with a pointer.

    But, CISTclHelper_sMakeCUIntArray, it seems to be an array of integer pointers, not memory pointers.

    Is there a TclHelper that can update a user part property string when I'm given an unsigned integer pointer to part but need to parse a list of user properties?

    I need to change a user property string of a part instance.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • oldmouldy
    oldmouldy over 7 years ago in reply to Robert Finley

    Ignore the CIS related TCL since you want to change "something" related to Capture, a Part Property, and not something related to CIS, like the Group that the Part is in from the example. Typically, the variable referencing DboState will only hold the result of any call to the Capture TCL library and reflect "success", not NULL, or "failure", is NULL. Once you have a Part Instance, you can use the GetEffectivePropertyStringValue to get what the property value is and SetEffectivePropertyStringValue to set it. If you don't know if the property exists, or not, use a "PropsIter", section 3.2.21 in the "TCL doc" to iterate over the properties for a match to the Property Name that you want. Take a look at the examples in the installation that dump Part Properties to see how to work through Part Properties. You will need to use the CString Helpers to convert between the "plain strings" that TCL uses and the "CStrings" that the Capture library routines require.

    Simply deleting the Part_Number value from the parts will remove the link to any database related part number which might be a lot easier that attempting this with TCL scripting.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Robert Finley
    Robert Finley over 6 years ago in reply to oldmouldy

    2-week company shutdown  made for lots of quiet.  Which is good because Tcl isn't easy.

    The BOM Report example is a good framework for a utility that caught all of the Value=DNI situations and updated PART_NUMBER with a DNIPrefix if it wasn't that way by default (mounting holes.)  Started by trying to use examples in Tcl documentation to iterate by active Design, then Active Schematic, Active Page...  I just couldn't get it to iterate even if variants or hierarchy was involved.

    The BomReport example iterates through all parts in the design without pages or schematics.  It gives us code that handles variant data and accurately traverses hierarchical designs.

    Basically, find all parts with Value set to "DNI" and use setEffectivePropertyStringValue to make sure the Part_Number prop has DNI as a prefix, so it won't be used by CIS Part Manager Update.

    Trimmed this code back to the DE menu integration for the second utility that checks the results, added the CIS report example to export base properties to a CSV file at risk for being overridden.  Feed that into a VB utility that SQL queries CIP for "correct" Footprint/MPN/Value by PART_NUMBER, and report instances where these properties will be reset by Part Manager.

    Once I figure out passing a CSV file locator to tcl exec, It's almost done. 

    I can't tell Engineers what to do.  But, I can fix Part Manager Update so it will no longer inflict nuclear-cloud level destruction of our designs.

    Thanks again for your guidance.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information