• 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. OrCAD Capture TCL to Iterate over all pins of a part in...

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 165
  • Views 14106
  • 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

OrCAD Capture TCL to Iterate over all pins of a part in a Library File

Kodela
Kodela over 9 years ago

Hi All,

I am new to TCL scripting in OrCAD Capture and wanting to write a simple script to

iterate over all pins of a part (multiple sections) in a Library file, and to print each of the pin number.

I have got an example from the user guide, to iterate over all pins of a part instance/ drawn instance:


set lIter [$lInst NewPinsIter $lStatus]

set lNullObj NULL

#get the first pin of the part

set lPin [$lIter NextPin $lStatus]

while {$lPin !=$lNullObj } {

#placeholder: do your processing on $lPin

#get the next pin of the part

set lPin [$lIter NextPin $lStatus]

}

delete_DboPartInstPinsIter $lIter

Just wondering how i shall proceed from here...

e.g  the Library file is "my_Library.olb",

the name of the part is "Our_Chip" and it comes with multiple sections.

Appreciate if any TCL expert can help, Thanks in Advance.

  • Cancel
  • oldmouldy
    oldmouldy over 9 years ago

    You need to read the earlier sections of the User Manual. You have the "inner loop" in your code example above, you will, probably, need to Start a Session, then Open a Design (Library is the same thing), then Iterate over the Library parts, when you get the matching part name, iterate through the "sections". See the later script example for "package corrections in library, or design" for some 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