• 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 4635
  • 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
  • eDave
    eDave over 10 years ago

    This is relatively easy to do via Skill. I would either use extracta (for speed) or open each DRA in the symbol editor rather than PCB editor.

    It depends what you are going to use the data for as to whether show element is the best capture method. With Skill you could easily output exactly what you need.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • abdulhalim
    abdulhalim over 10 years ago
    Hi Dave, unfortunately, I am unsure how to output the desired information through Skill. Right, the library directory has both .dra and .psm files so .dra would work as well. What we want is the class: PACKAGE_GEOMETRY, subclass: PLACE_BOUND_TOP and DFA_BOUND_TOP, Exterior boundary: segment:xy and save the difference between both max x and min x, and max y and min y. Basically we want the X-Y sizes from DFA_BOUND_TOP subclass and the PACKAGE_HEIGHT_MAX from PLACE_BOUND_TOP subclass. Each symbol's extracted files will be named after the symbol. Ie: Resistor1 will be named Resistor1.txt with the symbol name, x, y, package_height_max.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 10 years ago
    Ok. I would use Skill for this and open each dra sequentially and do the maths. I would have thought it to be more useful to drop the results into a csv file than individual files but either is straight forward. Contact me offline at dave.elder at gmail for help with Skill if you need it.
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • abdulhalim
    abdulhalim over 10 years ago

    Thank you for clarifying that.

    Actually, now that I think about it, the original purpose of saving the results in individual files was to use those files to do the math and parse the information separately. However, when you brought that up. I think it'd make more sense for it to be saved in .csv file since SKILL will be able to handle it all.

    For example, the output_result.txt would contain:

    Resistor1, X, Y, PACKAGE_HEIGHT_MAX
    Resistor2, X, Y, PACKAGE_HEIGHT_MAX

    Again, x should be the difference between the max X and min X from segments under sublcass DFA_BOUND_TOP, y's steps are the same as x, and PACKAGE_HEIGHT_MAX is to just search for the string and extract its value.

    I can contact you early next week regarding my problem and how to use SKILL as a solution for it. Thank you for the quick responses today.

    Do you know anything I should refer to in order to get me started on this in SKILL? I am unsure how the exact commands in SKILL to find the .dra's PLACE_BOUND_TOP and DFA_BOUND_TOP strings.

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