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 Scripting - TCL Using TCL script to find and change property of a part in...

Stats

  • State Verified Answer
  • Replies 3
  • Subscribers 11
  • Views 4710
  • Members are here 0
More Content

Using TCL script to find and change property of a part in the scope of whole design file

YuanYan
YuanYan over 2 years ago

Hello, all

  I would like to achieve change property of parts in the scope of a whole design file.  Right now, I am able to use "findparts and setproperty" commands to change property within a selected sch page, but not in the scope of a whole design file.  Any ideas on how to possibly achieve it. Hope someone can shed some light on it. Would appreciate any help.

Regards,

Yuan

  • Sign in to reply
  • Cancel
  • CadAP
    +1 CadAP over 2 years ago

    set object [CapFindObjects $COrFindFilterDlg_PARTS {*}]

    You can replace * with the property value present on the components.It's return the DboPlacedInst. You can itearte over each DboPlacedInst. Please make sure that schemticView(any one page is open) is active.

    for example i am searching the property with Value "T4" and changing it value to "T3"


    set object [CapFindObjects $COrFindFilterDlg_PARTS {T4}]
    set lStatus [DboState]

    foreach item $object {


    set ItemId [$object GetId $lStatus ]
    SelectObjectById $ItemId
    SetProperty {TEST} {T3}


    }

    SaveAll

    Hope this helps.

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

    It works and satisfies my need perfectly. Just one more question for understanding, I understand that COrFindFilterDlg_PARTS is a enum type of COrFindFilterDlg::QueryModeT, any description for other enum types can we find in any relevant document? (because I cannot find any further info for COrFindFilterDlg_PARTS in "TclTk extension" document). Hope you can point out to help. Thanks.

    Yuan

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • CadAP
    0 CadAP over 1 year ago in reply to YuanYan

    Hi Yuan,

    Glad to hear that command satisfy your requirement.

    COrFindFilterDlg::QueryModeT

    Below are the ::QuerModeT, Similar to the object we select in "Find in"(Ctrl+F) command used in Capture schematic Editor:


    PARTS
    OFF_PAGE_CONNECTORS
    BOOKMARKS
    COMMENT_TEXT
    NETS
    FLATNETS
    HIER_PORTS
    DRCS
    TITLEBLOCKS
    POWER_SYMBOLS
    HIER_PINS
    PARTS_PINS
    VARIANTPARTS
    NETS_SINGLENODE
    DIFFERENTIAL_PAIR
    CLASS
    ELECTRICAL_CSET
    SPACING_CSET
    PHYSICAL_CSET
    MATCH_GROUP

    • 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