• 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. TCL script retrieve Part attributes question from new guy...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 163
  • Views 15477
  • 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

TCL script retrieve Part attributes question from new guy in OrCAD

George Han
George Han over 12 years ago

I am trying to retrieve all the parts and their attributes in OrCAD Capture Design. I do get all the data by using the script below. But when I output the vaules from $lName and $lDeviceDesignator, the values are not what I expected, just like R123, C456 for Designator. I got the internal code like _203b8f0e_p_CString for Designator and _70228f0e_p_CString for Name. How can I get the real vaules, lsuch as R123, C456? Thank you.

 #-----------------Get Part Attributes

#get the name 

set lName [DboTclHelper_sMakeCString] 

$lPlacedInst GetName $lName

#get the device designator 

set lDeviceDesignator [DboTclHelper_sMakeCString] 

$lPlacedInst GetReferenceDesignator $lDeviceDesignator

#------------------------------------------------- 

  • Cancel
  • oldmouldy
    oldmouldy over 12 years ago

    Capture uses CStrings, TCL needs ConstCharPtrs, use the helper function to convert the CString to a ConstCharPtr so that TCL can use it. See the String Type Conversion paragraph page 28 of the OrCAD_Capture_TclTk_Extensions.pdf in the tools\Capture\tclscripts directory of the installation.

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • George Han
    George Han over 12 years ago

    Hello oldmouldy,

     

    Appreciate your prompt response. I got everything done after  I followed the explanation you told me. 

     

    George Han 

    • 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.

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

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