• 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. Changing Wire Property Name from Port Name to Wire Alia...

Stats

  • State Verified Answer
  • Replies 2
  • Subscribers 12
  • Views 1504
  • Members are here 0
More Content

Changing Wire Property Name from Port Name to Wire Aliasname

karthikeyank
karthikeyank over 1 year ago

Hi,

I want to update selected wire "schematic net" "NAME" from port name to wire Aliasname. I've tired by using "SetEffectivePropStringValue" but it's not updating. also, I don't want to delete the port name.

can anyone please help me out to find the solution.

From Port to Alias Name.

  

To

Code:

# Selecting Wire in Runtime
set selectedobjs [GetSelectedObjects]
set objlength [llength $selectedobjs]
set lStatus [DboState]
for {set i 0} {$i < $objlength} {incr i} {
set obj [lindex $selectedobjs $i]
set lAliasIter [$obj NewAliasesIter $lStatus]
set lAlias [$lAliasIter NextAlias $lStatus]
set lAliasName [DboTclHelper_sMakeCString]
$lAlias GetName $lAliasName
set lPageName [DboTclHelper_sGetConstCharPtr $lAliasName]
puts $lPageName
set lPropNameCStr [DboTclHelper_sMakeCString "Name"]
set PropVal [$obj SetEffectivePropStringValue $lPropNameCStr $lAliasName]
delete_DboWireAliasesIter $lAliasIter
}

  • Cancel
  • Sign in to reply
  • CadAP
    +1 CadAP over 1 year ago

    HI karthikeyank,

    Please use below tcl script to set the schematic net name.

    Properties are attached to schematic net, you have to iter over schematic net. You can get schematic net from wire. 

    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 lAliasIter [$lObject NewAliasesIter $lStatus]
    #get the first alias of wire
    set lAlias [$lAliasIter NextAlias $lStatus]
    while { $lAlias!=$lNullObj} {
    $lAlias GetName $name
    # puts [DboTclHelper_sGetConstCharPtr $nm]
    #Set name schematic net name
    $lschNet SetName $name
    # placeholder: do your processing on $lAlias
    # get the next alias of wire
    set lAlias [$lAliasIter NextAlias $lStatus]
    }
    DboTclHelper_sEvalPage $lPage
    delete_DboWireAliasesIter $lAliasIter
    }

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

    Thanks.. It works good..

    • Cancel
    • Vote Up +1 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