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 More information about enum type variable in TCL Class

Stats

  • State Verified Answer
  • Replies 5
  • Subscribers 11
  • Views 563
  • Members are here 0
More Content

More information about enum type variable in TCL Class

Morgan
Morgan 2 months ago

Hi Friends of the community,

I will use one TCL class which have a enum type variable DboBaseObject::ObjectTypeT, but I can't find more information about it on the document  TCL/Tk Extensions. 

Can you proviod more information about enum type variable like this, and What arguments should be passed to the TCl class? How I can use this?

  • Sign in to reply
  • Cancel
  • CadAP
    0 CadAP 2 months ago

    Morgan 

    When you select a part and type below command you will get nType.

    [GetSelectedObject] GetObjectType --> return nType (13 ) PLACED_INSTANCE

    if you type puts $DboBaseObject_PLACED_INSTANCE returns 13.

    Now you can select wire or other schematic object and get the nType value.

    Hope it helps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Morgan
    0 Morgan 2 months ago in reply to CadAP

    Hi CadAP,

    I mean one TCL class such as GetCachedSymbol or ReplaceCache, the varible "type: enum DboBaseObject::ObjectTypeT" or "nObjType: enum DboBaseObject::ObjectTypeT", What arguments should be passed to it? How to define the arguments and Where to query?

    #

    #

    #

    GetCachedSymbol(SourceLibName, SourceSymbolName, type) : returns DboSymbol

    Class : DboLib(DboBaseObject):

    Parameters:

    SourceLibName: CString &

    SourceSymbolName: CString &

    type: enum DboBaseObject::ObjectTypeT

    #

    #

    #

    UpdateCache(sourceLibName, sourceObjName, nObjType) : returns DboState

    Class : DboLib(DboBaseObject):

    Parameters:

    sourceLibName: CString &

    sourceObjName: CString &

    nObjType: enum DboBaseObject::ObjectTypeT

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Morgan
    0 Morgan 2 months ago in reply to CadAP

    Hi CadAP,

    Your command maybe wrong, when I select one part, and tpye command [GetSelectedObject] GetObjectType, it return [    1]invalid command name "GetSelectedObject", when I type command  [GetSelectedObjects] GetObjectType, it return 13, but not "nType (13 ) PLACED_INSTANCE"

    When I type command "puts $DboBaseObject_PLACED_INSTANCE", it really print 13.

    But, How I know should use variable "$DboBaseObject_PLACED_INSTANCE" if that command dosen't return "nType (13 ) PLACED_INSTANCE" ?

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

    Morgan 

    Correct syntax is GetSelectedObjects. 

    In place of DboBaseObject::ObjectTypeT variable you can provide nType 13 for placed instance, 65  "TITLEBLOCK_INSTANCE"  15 PORT_INSTANCE etc.

    But, How I know should use variable "$DboBaseObject_PLACED_INSTANCE" if that command dosen't return "nType (13 ) PLACED_INSTANCE" ?

    Ans: From design cache container if you want to filter only placed instance (all components) you need to pass value 13 in place ofDboBaseObject_PLACED_INSTANCE,  or 65 for TITLEBLOCK_INSTANCE etc.

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

    Thanks CadAP.

    • 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