Home
  • Products
  • Solutions
  • Support
  • Company

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  • Products
  • Solutions
  • Support
  • Company
Community PCB Design & IC Packaging (Allegro X) Allegro X Capture CIS Editing the schematic symbol part properties using the TCL...

Stats

  • State Verified Answer
  • Replies 7
  • Subscribers 40
  • Views 4139
  • Members are here 0
More Content

Editing the schematic symbol part properties using the TCL command in OrCAD Capture

RohitRohan
RohitRohan 10 months ago

Hai Community,

I want to copy all the values of one property tab to another property tab using the TCL command in the Capture.

For example, in the below image, there is PCB Footprint value property defined for all the schematic symbols, also there is PCB_FP properties for which values are blank for all the schematic symbols.

Can i use the TCL command such that all the values of PCB Footprint property will be transfer or copied to PCB_FP property for all schematic symbols.

For reference, Once the TCL command executed / completed, below is how it should look like after execution  (Note: In the below image the values are edited using Microsoft paint and not using the OrCAD Capture, (Edited image))

Regards,

Rohit Rohan

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

    Hi RohitRohan,

    Please use the below tcl code for updating the property name "PCB_FP" with the value taken from "PCB Footprint" property.

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]
    set lPartCount 0
    set lPropName [DboTclHelper_sMakeCString "PCB Footprint"]
    set lPropName1 [DboTclHelper_sMakeCString "PCB_FP"]
    set lPropValue [DboTclHelper_sMakeCString]
    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} {
    # 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} {
    set lObjType [$lPlacedInst GetObjectType]
    if {$lObjType == 13} {
    #placeholder: do your processing on $lPlacedInst
    set lStatus [$lPlacedInst GetEffectivePropStringValue $lPropName $lPropValue]

    if {[$lStatus OK] ==1} {
    $lPlacedInst SetEffectivePropStringValue $lPropName1 $lPropValue
    incr lPartCount
    $lStatus -delete
    }
    # $lPlacedInst GetName $lPart_Name

    # puts $lObjType
    # puts $lObjType
    }
    }
    #get the next part inst
    set lInst [$lPartInstsIter NextPartInst $lStatus]
    }
    #get the next page
    set lPage [$lPagesIter NextPage $lStatus]
    }
    delete_DboSchematicPagesIter $lPagesIter
    #get the next schematic view
    set lView [$lSchematicIter NextView $lStatus]
    }
    delete_DboLibViewsIter $lSchematicIter
    puts "$lPartCount Parts PCB_FP poperty are updated"

    Please check and let me know you feedback.

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

    Hai CadAP,

    Hope you are doing well,

    Similarity, can we create a TCL code for removing all the properties of all the schematic symbol in the schematic design.

    Like there are few schematic symbol on the schematic page, I want to remove all the properties of each and every symbols using the TCL command.

    Regards,

    Rohit Rohan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • RohitRohan
    0 RohitRohan 9 months ago in reply to RohitRohan

    Or at least to delete all the user defined properties for the schematic symbols in the schematic design.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • RohitRohan
    0 RohitRohan 9 months ago in reply to RohitRohan

    Or at least to delete all the user defined properties for the schematic symbols in the schematic design.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • CadAP
    0 CadAP 9 months ago in reply to RohitRohan

    Hi Rohit,

    I am good, I believe you are also good.

    Try below tcl code,  Property which are not locked by schematic are deleted.

    set lSession $::DboSession_s_pDboSession
    DboSession -this $lSession
    set lNullObj NULL
    set lStatus [DboState]
    set lDesign [$lSession GetActiveDesign]
    set lSchi_Name [DboTclHelper_sMakeCString]

    set lPart_Name [DboTclHelper_sMakeCString]
    set lPart_Name1 [DboTclHelper_sMakeCString]
    set lPrpName [DboTclHelper_sMakeCString]
    set lPrpValue [DboTclHelper_sMakeCString]
    set lPrpType [DboTclHelper_sMakeDboValueType]
    set lEditable [DboTclHelper_sMakeInt]
    set propnamelist {}
    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} {
    set lPropsIter [$lPlacedInst NewEffectivePropsIter $lStatus]
    set lStatus [$lPropsIter NextEffectiveProp $lPrpName $lPrpValue $lPrpType $lEditable]

    while {[$lStatus OK] == 1} {
    #placeholder: do your processing for $lPrpName $lPrpValue $lPrpType $lEditable
    set lPropName [DboTclHelper_sGetConstCharPtr $lPrpName]
    set lState [$lPlacedInst DeleteEffectiveProp $lPrpName]
    # puts [DboTclHelper_sGetConstCharPtr $lPrpName]
    #get the next effective property
    set lStatus [$lPropsIter NextEffectiveProp $lPrpName $lPrpValue $lPrpType $lEditable]
    }
    delete_DboEffectivePropsIter $lPropsIter

    }
    #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 $partlist
    }

    Please let me know your feedback.

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

    Hai CadAP,

    Thank you so much for the previous TCL code and I really appreciate it. Slight smile

    Currently I have an very urgent requirement, I have a schematic symbol of 100 pins, the problem is all the 100 pins are having the same pin name which is "Vss", when I create netlist from the schematic it creates an error stating that pin names are duplicated, I have disabled the DRC check for duplicate pin names but still the same problem.

    Is it possible to create a TCL command such that I want to change the Pins names of the schematic symbol in sequence order, like the schematic symbol has 100 pins with all being Vss, I want to make them like Vss1 to Vss100 using the TCL command. 

    Regards,

    Rohit Rohan

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

    Hi Rohit Rohan,

    Please find the tcl for changing the selected Part pin name from VSS to Vss$Pin_Number.

    For example,

              If a part has the pin name VSS and the same pin has pin number 1, then the new pin name will be VSS1.

    set lStatus [DboState]
    set lInst [GetSelectedObjects]

    set lPlacedInst [DboPartInstToDboPlacedInst $lInst]
    #Get DboLibPart from the Placed Inst
    set lPart [$lPlacedInst GetPart $lStatus]
    set lIter [$lPart NewPinsIter $lStatus]
    set lNullObj NULL
    set lPinNameCS [DboTclHelper_sMakeCString]
    set lPinNumberCS [DboTclHelper_sMakeCString]
    #get the first pin of the part
    set lPin [$lIter NextPin $lStatus]
    while {$lPin !=$lNullObj } {
    $lPin GetPinName $lPinNameCS
    set lPinName "[DboTclHelper_sGetConstCharPtr $lPinNameCS]"
    # puts $lPinPos
    if {$lPinName == "VSS"} {
    set lPinPos [$lPin GetPinPosition $lStatus]
    set lNewPinPos [expr {$lPinPos + 1}]
    set lNewPinName "$lPinName$lNewPinPos"
    set lNewPinNameCS [DboTclHelper_sMakeCString "$lNewPinName"]
    set lStatus [$lPin SetPinName $lNewPinNameCS]
    if {[$lStatus OK] != 1} {
    puts "Error in changing the pin name of $lNewPinName"

    }
    }
    #get the next pin of the part
    set lPin [$lIter NextPin $lStatus]
    }
    $lStatus -delete
    delete_DboSymbolPinsIter $lIter

    Hope this will address your current concern and let you move forward in your design process.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Reject 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