• 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. Database TCL commands, referencing an object

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 164
  • Views 12634
  • 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

Database TCL commands, referencing an object

jelman
jelman over 4 years ago

I am creating a TCL script to create a large pin count part.  After reading through the OrCAD Capture Tcl/Tk Extensions – Application Notes, I'm still a bit confused about how to load in a library object.  Can I do this by file path, or by name inside a session?  Is $Name in get lib a file path?  Also, what is the difference between GetLib, GetLiband Schematics, and GetOpenLib?  There aren't descriptions for these functions, just I/O datatypes.  Is there some other references I should be looking at other than OrCAD_Capture_TclTk_Extensions.pdf?

  • Cancel
  • jelman
    jelman over 4 years ago

    Seems like I got this first part working.  I can open a library object and check the name:

    #create session object for this session
    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession

    #create state and name variables to pass to functions
    set lStatus [DboState]
    set lName [DboTclHelper_sMakeCString]

    #filepath to TCL string to C-string
    set pLibPath [file normalize {C:\Library\CONNECTORS.OLB}]
    set lLibPath [DboTclHelper_sMakeCString $pLibPath]

    #open library object from filepath c-string
    set lLib [$lSession GetLibAndSchematics $lLibPath $lStatus]

    #check name of library object
    $lLib GetName $lName
    puts [DboTclHelper_sGetConstCharPtr $lName]

    but, I can't seem to load a part out of the library, 1551920-2 is the name of a part in the library.  I just get a NULL for the object when I run this code.  Any idea what I'm doing wrong? 

    set pPart_Name {1551920-2}
    set lPart_Name [DboTclHelper_sMakeCString $pPart_Name]
    set lPart [$lLib GetPart $lPart_Name $lStatus]
    puts $lPart

    • 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