• 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. Getting all the values showing in "Name" property dropd...

Stats

  • State Verified Answer
  • Replies 5
  • Subscribers 13
  • Views 1505
  • Members are here 0
More Content

Getting all the values showing in "Name" property dropdown

karthikeyank
karthikeyank 3 months ago

Hi,

I'm trying to get the selected wire names that showing in property by using my below program I can be able to return only one name, instead I want to return all the names in dropdown.

is that possible? if yes please guide me to get the output.

Current output:

DPS25F

Expected output:

DPS25F,DPS25S,1__6__VDD_LT__PWR

Program:

SetOptionBool Journaling True

namespace eval chk {} {
variable dirName [file dirname [info script]]
}

proc chk::chkfunc {} {
set lNullObj NULL
set lStatus [DboState]
set lAllWire [GetSelectedObjects]
set name [DboTclHelper_sMakeCString]
foreach lObject $lAllWire {
set lPage [$lObject GetOwner]
set lNet [$lObject GetNet $lStatus]
set lschNet [$lNet GetSchematicNet]

set lPropsIter [$lschNet NewEffectivePropsIter $lStatus]
set lPrpName [DboTclHelper_sMakeCString]
set lPrpValue [DboTclHelper_sMakeCString]
set lPrpType [DboTclHelper_sMakeDboValueType]
set lEditable [DboTclHelper_sMakeInt]
set lStatus [$lPropsIter NextEffectiveProp $lPrpName $lPrpValue $lPrpType $lEditable]
while {[$lStatus OK] == 1} {
set NetFilt [DboTclHelper_sGetConstCharPtr $lPrpName]
if {$NetFilt == "Name" } {
set Name [DboTclHelper_sGetConstCharPtr $lPrpName]
set Value [DboTclHelper_sGetConstCharPtr $lPrpValue]
puts $Value
}
set lStatus [$lPropsIter NextEffectiveProp $lPrpName $lPrpValue $lPrpType $lEditable]
}
delete_DboEffectivePropsIter $lPropsIter
DboTclHelper_sEvalPage $lPage
}
}
chk::chkfunc

  • Cancel
  • Sign in to reply
Parents
  • CadAP
    0 CadAP 3 months ago

    karthikeyank 

    Please try the below code and let me know how it goes:

    Select a net and source the code it will dump all schematic name of selected net

    set lStatus [DboState]
    set lnet [GetSelectedObjects]
    set lSchnet [[$lnet GetNet $lStatus ] GetSchematicNet]
    # set lschi [[$lnet GetOwner] GetOwner]
    set schilist {}
    set lname [DboTclHelper_sMakeCString]
    set schiter [$lSchnet NewNetsIter $lStatus]

    set lschinet [$schiter NextNet $lStatus]
    while {$lschinet != "NULL"} {

    $lschinet GetNetName $lname

    set schiname [DboTclHelper_sGetConstCharPtr $lname]
    if {[lsearch $schilist $schiname] == -1} {

    lappend schilist $schiname
    }

    set lschinet [$schiter NextNet $lStatus]
    }

    puts $schilist

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • karthikeyank
    0 karthikeyank 3 months ago in reply to CadAP

    Hi,

    Thanks for the reply, by using above program I can be able to return schematic net names. I want to get net alias name as well can you help me with that.

      

    Now im getting this:

    DPS25S DPS25F

    Expected Ouput:

    DPS25S DPS25F 1__6__VDD_LT__PWR

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    +1 CadAP 3 months ago in reply to karthikeyank

    karthikeyank 

    Updated code for getting alias and schematic net in list and dump the list in command Capture command window.

     

    set lStatus [DboState]
    set lnet [GetSelectedObjects]
    set lSchnet [[$lnet GetNet $lStatus ] GetSchematicNet]
    # set lschi [[$lnet GetOwner] GetOwner]
    set schilist {}

    set lAliasNameCString [DboTclHelper_sMakeCString]
    set lAliasIter [$lnet NewAliasesIter $lStatus]
    #get the first alias of wire
    set lAlias [$lAliasIter NextAlias $lStatus]
    while { $lAlias!="NULL"} {
    #placeholder: do your processing on $lAlias
    #get the next alias of wire
    $lAlias GetName $lAliasNameCString
    set lAliasName [DboTclHelper_sGetConstCharPtr $lAliasNameCString]
    lappend schilist $schiname
    set lAlias [$lAliasIter NextAlias $lStatus]
    }

    set lname [DboTclHelper_sMakeCString]
    set schiter [$lSchnet NewNetsIter $lStatus]

    set lschinet [$schiter NextNet $lStatus]
    while {$lschinet != "NULL"} {

    $lschinet GetNetName $lname

    set schiname [DboTclHelper_sGetConstCharPtr $lname]
    if {[lsearch $schilist $schiname] == -1} {

    lappend schilist $schiname
    }

    set lschinet [$schiter NextNet $lStatus]
    }
    # NewNetsIter
    delete_DboWireAliasesIter $lAliasIter
    # delete_DboSchematicNetsIter $schiter

    puts $schilist

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Reply
  • CadAP
    +1 CadAP 3 months ago in reply to karthikeyank

    karthikeyank 

    Updated code for getting alias and schematic net in list and dump the list in command Capture command window.

     

    set lStatus [DboState]
    set lnet [GetSelectedObjects]
    set lSchnet [[$lnet GetNet $lStatus ] GetSchematicNet]
    # set lschi [[$lnet GetOwner] GetOwner]
    set schilist {}

    set lAliasNameCString [DboTclHelper_sMakeCString]
    set lAliasIter [$lnet NewAliasesIter $lStatus]
    #get the first alias of wire
    set lAlias [$lAliasIter NextAlias $lStatus]
    while { $lAlias!="NULL"} {
    #placeholder: do your processing on $lAlias
    #get the next alias of wire
    $lAlias GetName $lAliasNameCString
    set lAliasName [DboTclHelper_sGetConstCharPtr $lAliasNameCString]
    lappend schilist $schiname
    set lAlias [$lAliasIter NextAlias $lStatus]
    }

    set lname [DboTclHelper_sMakeCString]
    set schiter [$lSchnet NewNetsIter $lStatus]

    set lschinet [$schiter NextNet $lStatus]
    while {$lschinet != "NULL"} {

    $lschinet GetNetName $lname

    set schiname [DboTclHelper_sGetConstCharPtr $lname]
    if {[lsearch $schilist $schiname] == -1} {

    lappend schilist $schiname
    }

    set lschinet [$schiter NextNet $lStatus]
    }
    # NewNetsIter
    delete_DboWireAliasesIter $lAliasIter
    # delete_DboSchematicNetsIter $schiter

    puts $schilist

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
Children
  • karthikeyank
    0 karthikeyank 3 months ago in reply to CadAP

    Thanks for the support it worked well.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • KD202502275710
    0 KD202502275710 3 months ago in reply to CadAP

    Genious

    • 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