Quantcast
Channel: Cadence PCB Design Forum
Viewing all articles
Browse latest Browse all 5525

Guide to Allegro Macro Language changes

$
0
0

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


Viewing all articles
Browse latest Browse all 5525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>