• 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. Allegro X Scripting - TCL
  3. Copying one part to project library copies whole librar...

Stats

  • State Verified Answer
  • Replies 2
  • Subscribers 14
  • Views 2996
  • Members are here 0
More Content

Copying one part to project library copies whole library

mvanderwal
mvanderwal over 2 years ago

I'm new to Capture CIS. I'm trying to copy to the LMC6482 from the OPAmp library, but when I select the part, copy, and then paste it into the project library, it copies the whole library into my project. This doesn't happen when copying things from capsym. I notice that they seem to be different files. One is a part and the other is a symbol as far as I can tell. Is there a way to copy just a single part from one library to another?

  • Sign in to reply
  • Cancel
  • CadAP
    +1 CadAP over 2 years ago

    #Tcl Script to help to copy a part from the source library to destination library.

    # Please copy the tcl code to a notepad or notepad++ and save it as copy_part.tcl.
    #Now open Orcad Capture and go to capture command window(if command window not visible go to View-->Command Window).
    #Type in Command Window , source {<path_of_tcl_file>/copy.tcl}and press enter.

    #After sourcing the tcl code, open the destination olb, part is now available to the olb.

    #Getting the current session.
    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession

    set lStatus [DboState]

    #Package/Symbol/part name that is presnet in source library and need to copy to destination library
    set partName "LMC6482"
    # puts $partName

    set partNameCS [DboTclHelper_sMakeCString $partName]

    #set the source library from which you want to copy the part
    set srcOlb [file normalize {C:\Cadence\SPB_17.4\tools\capture\library\OPAmp.olb}]
    #set the destination library where you want to paste the library
    set destOlb [file normalize {C:\Cadence\LIBRARY2.OLB}]

    set srcOlbCS [DboTclHelper_sMakeCString $srcOlb]
    set destOlbCS [DboTclHelper_sMakeCString $destOlb]

    #Get the dboLib from the source library
    set srcLib [$lSession GetLib $srcOlbCS $lStatus]

    # puts $srcLib

    #Get the Dbolib from the destination library
    set destLib [$lSession GetLib $destOlbCS $lStatus]

    #Get the package from the source library
    set pkageName [$srcLib GetPackage $partNameCS $lStatus]

    # puts $pkageName

    #Copy the package to the destination library
    set copyPkg [$destLib CopyPackageAll $pkageName $partNameCS $lStatus]

    #Mark library for save
    $lSession MarkAllLibForSave $destLib

    #Save the library
    $lSession SaveLib $destLib

    #Remove the libarary form the current session
    $lSession RemoveLib $destLib

    Hope this helps!

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • further
    0 further over 1 year ago

     The root cause of this problem is:LMC6482 have Part Aliases

    you can save OPAmp library as a temp library ,then  delete all  Aliases . and then copy LMC6482 from the OPAmp library and then paste it into the project library

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • 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