• 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. How can I get other parts infomation of a multi-part package...

Stats

  • State Verified Answer
  • Replies 13
  • Subscribers 14
  • Views 4633
  • Members are here 0
More Content

How can I get other parts infomation of a multi-part package part with tcl script?

Jadystone
Jadystone over 1 year ago

After I select just a part (for example U2A)  of a multi-part symbol. How I use TCL script to get other parts (such as U2B/U2C....) infomations?

I want to use tcl to get all wires connected to the part pins. In other word, I want to iterate all nets on all pins for the multi-part symbol.

  • Cancel
  • Sign in to reply
  • JuanCR
    0 JuanCR over 1 year ago

    Hi Jadystone,

    We're looking into your query. Will get back to you ASAP.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    +1 CadAP over 1 year ago

    Hi Jadystone,

    Select the parts with multiple section and source the below code:


    proc dumplist {ref} {

    #Use current Session in Orcad_Capture
    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]
    set lPropRef [DboTclHelper_sMakeCString "Reference"]
    set lPropPRName [DboTclHelper_sMakeCString "Part Reference"]
    set lPropPRVal [DboTclHelper_sMakeCString ]
    set lPropRefVal [DboTclHelper_sMakeCString ]
    set reflist {}
    if {$lDesign != $lNullObj} {

    set lSchematicIter [$lDesign NewViewsIter $lStatus $::IterDefs_SCHEMATICS]
    #get the first schematic view
    set lView [$lSchematicIter NextView $lStatus]

    set lPage_Name [DboTclHelper_sMakeCString]
    while { $lView != $lNullObj} {
    #dynamic cast from DboView to DboSchematic
    set lSchematic [DboViewToDboSchematic $lView]
    $lSchematic GetName $lSchi_Name
    set lPagesIter [$lSchematic NewPagesIter $lStatus]
    #get the first page
    set lPage [$lPagesIter NextPage $lStatus]
    # puts [DboTclHelper_sGetConstCharPtr $lSchi_Name]
    while {$lPage!=$lNullObj} {
    #placeholder: do your processing on $lPage
    $lPage GetName $lPage_Name
    # puts [DboTclHelper_sGetConstCharPtr $lPage_Name]
    set lPartInstsIter [$lPage NewPartInstsIter $lStatus]
    #get the first part inst
    set lInst [$lPartInstsIter NextPartInst $lStatus]
    while {$lInst!=$lNullObj} {
    #dynamic cast from DboPartInst to DboPlacedInst
    set lPlacedInst [DboPartInstToDboPlacedInst $lInst]
    if {$lPlacedInst != $lNullObj} {
    $lPlacedInst GetEffectivePropStringValue $lPropRef $lPropRefVal
    $lPlacedInst GetEffectivePropStringValue $lPropPRName $lPropPRVal
    if {[DboTclHelper_sGetConstCharPtr $lPropRefVal ] == $ref && [DboTclHelper_sGetConstCharPtr $lPropPRVal] != $ref} {

    lappend reflist [DboTclHelper_sGetConstCharPtr $lPropPRVal]

    }
    }
    #get the next part inst
    set lInst [$lPartInstsIter NextPartInst $lStatus]
    }
    #get the next page
    set lPage [$lPagesIter NextPage $lStatus]
    }
    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    delete_DboSchematicPagesIter $lPagesIter
    return $reflist
    }
    }


    set selObj [GetSelectedObjects]
    set lPropRefDes [DboTclHelper_sMakeCString "Reference"]
    set lPropRefDesVal [DboTclHelper_sMakeCString ]
    foreach obj $selObj {

    $obj GetEffectivePropStringValue $lPropRefDes $lPropRefDesVal
    set lRefdes [DboTclHelper_sGetConstCharPtr $lPropRefDesVal]
    # puts $lRefdes
    puts [dumplist $lRefdes]

    }

    Hope this helps!

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

    I get it. Thank you very much!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tennywhy
    0 tennywhy over 1 year ago in reply to Jadystone

    if have one pin number eg U1.5,
    it's belongs to a multi-part package part,eg: U1.5 at the section U1B
    how can i get the U1B's page name from U1.5 with tcl
    could you give me some advice ?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP over 1 year ago in reply to tennywhy

    tennywhy  above tcl work for selected instance not for pin but you can modify the above tcl for getting the information when select pin .

    Tyr below suggestion to achieve your requirement,

    1. Get the selected Pin dbId (use command "GetSelectedObjects").

    2. Get the owner of the selected part (use command [GetSelectedObjects] GetOnwer). It will return the placed part instance.

    Now you have part instance you can use above tcl code to get the rest of information.

    Do let me know if still stuck.

    • 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