• 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 System Capture (EE Cockpit)
  3. Looking for basic example of TCL commands in System Capture...

Stats

  • State Verified Answer
  • Replies 3
  • Subscribers 26
  • Views 2382
  • Members are here 0
More Content

Looking for basic example of TCL commands in System Capture such as adding a component, adding a wire to a pin, adding a netname to the wire, etc

Sermet
Sermet 6 months ago

I know that System Capture supports TCL, and I found the documents for the API.

However, I am having a hard time finding an example of basic commands such as adding a component and connecting to a pin, attaching a netname to it, etc.

I can go run a command manually, check the corresponding TCL command in the Command window, and cross refence it in the TCL API documentation. That is definitely one way to do it.

But, I was expecting at least one example covering setting up a new page, adding some components, making connections, changing properties, etc.

  • Sign in to reply
  • Cancel
Parents
  • CadAP
    +1 CadAP 6 months ago

     Sermet 

    Below script will add a page below to current open page and add a component (library =rf_comp_lib, sym_1 {CAPP2} ) and create a wire with net name test and add property TEST=123TE.

    Also add page before and after current open page is also added in the below script but those commands are commented.

    #add a page, component, props and create connection to it.


    #add a new page
    sch::addPageFromPageToolBar
    # add a page after current page
    # insertPageAfterCurrentPage $pageSpath SCH PAGE
    # Add a page before current page

    # insertPageBeforeCurrentPage $pageSpath SCH PAGE
    #Get Active page spath
    set pageSpath [sch::dbGetActivePageSpath]

    #Add a component on current page
    addComponent {rf_comp_lib} {capp2} sym_1 {CAPP2} -n 1 -key [list {CDS_LIBRARY_ID=rf_comp_lib:CAPP2=0} {CDS_LIBRARY_PHYSICAL_ID=CAPP2=0} {PART_NAME=CAPP2=0} {PART_NAME=CAPP2=0} ] -pg $pageSpath -r 0 -m 0 -pos [list 9200 7100]


    #Adding wire to pins.

    set lSelobj [getSel]
    set lSelPos [sch::dbConvertToUserUnits [sch::dbGetPos $lSelobj]]
    set lChildren [sch::dbGetChildren $lSelobj]

    addProp -name {TEST} -value {123TE} -type 0 -display valOnly

    foreach child $lChildren {
    set lWireEndPoint {}
    set lChildType [sch::dbGetType $child]
    if {$lChildType == $sch::DBTInstTerm} {
    set lPinHotSpot [sch::dbGetHotSpot $child]
    set lUserHotSpot [sch::dbConvertToUserUnits $lPinHotSpot]
    set lWireYEndPoint [lindex $lUserHotSpot 1]
    if {[lindex $lSelPos 0] > [lindex $lUserHotSpot 0]} {
    set lWireXEndPoint [expr "[lindex $lUserHotSpot 0] - 250"]
    lappend lWireEndPoint $lWireXEndPoint $lWireYEndPoint
    # drawwire {test1} [list $lPinHotSpot ] -1 -1
    } else {set lWireXEndPoint [expr "[lindex $lUserHotSpot 0] + 250"] ; lappend lWireEndPoint $lWireXEndPoint $lWireYEndPoint}
    # puts "$lWireXEndPoint $lWireYEndPoint"
    puts "[lindex $lUserHotSpot 0],[lindex $lUserHotSpot 1 ] [lindex $lWireEndPoint 0],[lindex $lWireEndPoint 1]"
    drawWire {test1} [list [lindex $lUserHotSpot 0],[lindex $lUserHotSpot 1 ] [lindex $lWireEndPoint 0],[lindex $lWireEndPoint 1]] -1 -1

    }

    }

    Hope it helps.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject Answer
    • Cancel
  • Sermet
    0 Sermet 6 months ago in reply to CadAP

    Thank you, this is a nice example. Any plans to add something like this to the System Capture TCL documentation?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP 6 months ago in reply to Sermet

     Sermet  Thanks for your suggestion. I'll create sample script on the ASK(previously known as COS) portal.

    Also recommend you check ASK portal we have plenty of tcl script sample.

    https://support.cadence.com/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • CadAP
    0 CadAP 6 months ago in reply to Sermet

     Sermet  Thanks for your suggestion. I'll create sample script on the ASK(previously known as COS) portal.

    Also recommend you check ASK portal we have plenty of tcl script sample.

    https://support.cadence.com/

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