• 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. PCB Design
  3. Guide to Allegro Macro Language changes

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 164
  • Views 10482
  • Members are here 0
More Content
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Guide to Allegro Macro Language changes

FormerMember
FormerMember over 8 years ago

Prior Allegro releases used a much different macro language that (for the most part) still functions. I have many such macros I use constantly.

The macro language changed at some point (V16 onwards?) and recording a macro results in a .scr file recorded in this newer language (tcl?).

The newer syntax is very cryptic (reference manual?). Worse, when changing the color visibility of something in the color dialog box, as far as I can tell this newer syntax does not select the visibility state as 'ON' or 'OFF', it only toggles its status.

So for example, a script that adds the top_bounds to the current view is no longer possible. I can only toggle it.

I've tried extending old scripts by using the older syntax, but this seems to be hitting some limitations, in that newer classes (like 'Embedded Geometry') are not recognized.

So, is there a way to make an objects color visibility deterministic in the new language? Is there a way to reference newer objects in the old syntax?

e.g., I want this script (including he newer lines in bold) to work:

Version 14.2

scriptmode +invisible

setwindow pcb
trapsize 97
color
setwindow form.cvf_main
FORM cvf_main class_list Geometry
FORM cvf_main package_geometry/place_bound_bottom/visible NO
FORM cvf_main package_geometry/place_bound_top/visible YES
FORM cvf_main embedded_geometry/place_bound_L4-flex/visible NO
FORM cvf_main embedded_geometry/place_bound_L3-flex/visible YES
FORM cvf_main apply  
FORM cvf_main ok  

For reference, toggling the visibility of the boundaries on L4-Flex looks like this in the newer syntax:

version 17.2

setwindow pcb
trapsize 2136
# Macro file: coordinates are relative to pick on replay.
color192
QtSignal CVDLayerSplitter CVDLayersTree itemSelectionChanged Geometry "Embedded geometry"
QtSignal CVDLayerTable CVDLayerTableDelegate clickedBox 9 0
QtSignal CVDLayerSplitter CVDLayerTable dataChanged Place_Bound_L4-flex EmbGeo
QtSignal CVDLayerSplitter CVDLayerTable dataChanged Assembly_L4-flex EmbGeo
QtSignal CVDLayerSplitter CVDLayerTable selectionChanged
QtSignal ColorVisibilityDialog CVDApplyButton clicked
QtSignal ColorVisibilityDialog CVDOkButton clicked

Not being able to set absolutes is a killer. Before, I could turn on the top bounds, the bottom bounds, both top and bottom or neither by running one macro for each of these four options. This is not possible with only a toggle command.

Maybe I am missing something obvious here. If so, I apologize in advance :-)

-Colin

  • Cancel
  • eDave
    eDave over 8 years ago

    Why not use Skill?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • FormerMember
    FormerMember over 8 years ago

    Probably because I'm too lazy (or too old) to learn skill :-)

    Seriously though, the ability to record macros on the fly is nice and I'm not even slightly proficient in skill's syntax. I have over 200 Allegro macros that I use regularly and I really don't want to convert them to skill if they still do what I need them to do.

    [Add in Orcad Captures change to tcl and there is yet another new-to-me scripting language I need to learn!]

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • RandyR
    RandyR over 5 years ago

    I don't have the embedded license, but try something like this:

    version 17.2

    setwindow pcb
    trapsize 12857
    generaledit
    setwindow form.mini
    FORM mini class PACKAGE GEOMETRY
    FORM mini subclass PLACE_BOUND_TOP
    FORM mini subcolor 1
    setwindow pcb

    Note:  "subcolor 1" to make visible, "subcolor 0" to make invisible

    • Cancel
    • Vote Up 0 Vote Down
    • 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