• 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. Resizing Graphical Line in Part

Stats

  • State Not Answered
  • Replies 2
  • Subscribers 12
  • Views 868
  • Members are here 0
More Content

Resizing Graphical Line in Part

karthikeyank
karthikeyank 3 months ago


Hi,

Im trying to align pins in part i can able to relocate and I can able to resize the bounding box.

but i dont know how to resize graphical line same as bounding box can anyone plz help me out that would be really helpful.

Current Output I'm getting:

Expected Output:


Program:

SetOptionBool Journaling True
namespace eval Library_AutoModification {} {

variable dirName [file dirname [info script]]
}

proc Library_AutoModification::Library_AutoModificationFunc {} {

set Inpdt [open "input2.txt" r]
set InpPinList [list]
while { [gets $Inpdt data] >= 0 } {
lappend InpPinList $data
}
close $Inpdt

set lNullObj NULL
set lStatus [DboState]
set lLib [GetSelectedPMItems]
foreach lObject $lLib {
set SplitNo 0
set plIter [$lObject NewPartsIter $lStatus]
set lPart [$plIter NextPart $lStatus]
while {$lPart != $lNullObj} {
set SplitNo [expr $SplitNo + 1]

foreach ModListlp $InpPinList {
set ModSplitName [lindex [split $ModListlp ","] 0]
set ModPinName [lindex [split $ModListlp ","] 1]
set ModPinLoc [lindex [split $ModListlp ","] 2]
set ModPinVis [lindex [split $ModListlp ","] 3]
set ModPinTxt [lindex [split $ModListlp ","] 4]
if {$ModSplitName == $SplitNo} {
set lIter [$lPart NewPinsIter $lStatus]
set lPin [$lIter NextPin $lStatus]
while {$lPin !=$lNullObj } {

set lPinName [DboTclHelper_sMakeCString]
$lPin GetPinName $lPinName
set lPinName [DboTclHelper_sGetConstCharPtr $lPinName]

set lPinName [string toupper $lPinName]
set ModPinName [string toupper $ModPinName]

if {$lPinName == $ModPinName} {
set lHotSpotPoint [$lPin GetHotSpot $lStatus]
set lHotSpotPointX [expr [DboTclHelper_sGetCPointX $lHotSpotPoint]]
set lHotSpotPointY [expr [DboTclHelper_sGetCPointY $lHotSpotPoint]]

set lStartPoint [$lPin GetStartPoint $lStatus]
set lStartPointX [expr [DboTclHelper_sGetCPointX $lStartPoint]]
set lStartPointY [expr [DboTclHelper_sGetCPointY $lStartPoint]]


set displocation1 [DboTclHelper_sMakeCPoint [expr $lStartPointX] [expr $ModPinLoc]]
set displocation2 [DboTclHelper_sMakeCPoint [expr $lHotSpotPointX] [expr $ModPinLoc]]

$lPin SetStartPoint $displocation1
$lPin SetHotSpot $displocation2

set BBLastVal $ModPinLoc

}

set lPin [$lIter NextPin $lStatus]
}

}
}

set newBBox [DboTclHelper_sMakeCRect 0 0 100 [expr $BBLastVal + 10]]
$lPart SetBoundingBox $newBBox

set lPart [$plIter NextPart $lStatus]
}
}


}
Library_AutoModification::Library_AutoModificationFunc

  • Cancel
  • Sign in to reply
Parents
  • TechnoBobby
    0 TechnoBobby 2 months ago

    Hi karthikeyank ,

    You can try handling this through the Symbol Editor directly using the following command sequence:

    MenuCommand "2147" capLaunchNewSymbolEditor "<Complete_Lib_path>" "<Part_name>" 0 1
    OrSymbolEditor::execute activateSectionDiv <Section>
    OrSymbolEditor::execute selectObjectsAtPoint 0 0 false false true
    OrSymbolEditor::execute resizeBox 0 0 2 8

    This will open the Symbol Editor for the part, make the desired section active, select the graphical object from the origin, and resize it. Just make sure to update the placeholders with your actual library path, part name, section name and resizeBox coordinates accordingly.

    Hope this helps!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • TechnoBobby
    0 TechnoBobby 2 months ago

    Hi karthikeyank ,

    You can try handling this through the Symbol Editor directly using the following command sequence:

    MenuCommand "2147" capLaunchNewSymbolEditor "<Complete_Lib_path>" "<Part_name>" 0 1
    OrSymbolEditor::execute activateSectionDiv <Section>
    OrSymbolEditor::execute selectObjectsAtPoint 0 0 false false true
    OrSymbolEditor::execute resizeBox 0 0 2 8

    This will open the Symbol Editor for the part, make the desired section active, select the graphical object from the origin, and resize it. Just make sure to update the placeholders with your actual library path, part name, section name and resizeBox coordinates accordingly.

    Hope this helps!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • karthikeyank
    0 karthikeyank 2 months ago in reply to TechnoBobby

    Hi TechnoBobby,

    Thanks for your reply I am trying to modify in 16.6 v I wonder symbol editor command will work or not "OrSymbolEditor::execute" it is showing me error "[1]invalid command name "OrSymbolEditor::execute"

    • 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