• 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 PCB Editor
  3. How to extract over thousands of symbol's subclass with...

Stats

  • Replies 10
  • Subscribers 160
  • Views 4653
  • Members are here 0
More Content

How to extract over thousands of symbol's subclass with skill?

abdulhalim
abdulhalim over 10 years ago

Hello,

I am trying to automate a process of extracting symbol's DFA_BOUND_TOP and PLACE_BOUND_TOP using skill.

The symbol's are all located form our library's directory which can be placed on the board through Place -> Manually -> Select Advanced Settings tab to check the library box -> Select Placement List tab and select package symbols in the dropdown menu.

Steps what I would like for SKILL to be used:

  1. Open up Allegro PCB Editor (select desired product)
  2. Change the board grid size to millimeter
  3. Select Color192 (Ctrl + F5) to turn global visibility off besides DFA_BOUND_TOP and PLACE_BOUND_TOP
  4. Place symbol from library
  5. Get symbol's DFA_BOUND_TOP and PLACE_BOUND_TOP subclasses using "Show Element (F4)" with "shapes" under find option.
  6. Export the "Show Element" Box in .txt with symbol's name (ie: resistor1.txt).
  7. Repeat steps 4-6 until all the symbols from library .txt have been exported
  8. Close Allegro PCB Editor

Right now I have the process that is being done using the record macro. Unfortunately, it cannot use conditional or decision making, for example to name the file according to the symbol and implementing a for/while loop.

Any help or guidance is much appreciated.

If there's any questions please feel free to ask.

I am on 16.6.

  • Sign in to reply
  • Cancel
Parents
  • eDave
    eDave over 10 years ago
    If you have never done any Skill programming then you have some hard work in front of you. There is a good start with the Skill Language User Guide in the doc folder. To get the shapes you can use axlDBGetShapes("PACKAGE GEOMETRY/DFA_BOUND_TOP") and axlDBGetShapes("PACKAGE GEOMETRY/PLACE_BOUND_TOP"). For each shape you can get the extents using shpObjDBID ->bBox and simple maths to determine the x and y extents. The height is a property of the shape eg shpObjDBID ->prop ->PACKAGE_HEIGHT_MAX. Try this code for an example: foreach(shpObjDBID, axlDBGetShapes("PACKAGE GEOMETRY/PLACE_BOUND_TOP"))
    exts = shpObjDBID ->bBox
    x = caadr(exts) - caar(exts)
    y = cadadr(exts) - cadar(exts)
    height = axlMKS2UU(shpObjDBID ->prop ->PACKAGE_HEIGHT_MAX)
    sprintf(nil, "%g,%g,%g\n", x, y, height)
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • eDave
    eDave over 10 years ago
    If you have never done any Skill programming then you have some hard work in front of you. There is a good start with the Skill Language User Guide in the doc folder. To get the shapes you can use axlDBGetShapes("PACKAGE GEOMETRY/DFA_BOUND_TOP") and axlDBGetShapes("PACKAGE GEOMETRY/PLACE_BOUND_TOP"). For each shape you can get the extents using shpObjDBID ->bBox and simple maths to determine the x and y extents. The height is a property of the shape eg shpObjDBID ->prop ->PACKAGE_HEIGHT_MAX. Try this code for an example: foreach(shpObjDBID, axlDBGetShapes("PACKAGE GEOMETRY/PLACE_BOUND_TOP"))
    exts = shpObjDBID ->bBox
    x = caadr(exts) - caar(exts)
    y = cadadr(exts) - cadar(exts)
    height = axlMKS2UU(shpObjDBID ->prop ->PACKAGE_HEIGHT_MAX)
    sprintf(nil, "%g,%g,%g\n", x, y, height)
    )
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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