Simply described, a geometry macro (herein simply known as a macro) is a set of geometry or items created as a separate component that can be added to existing geometry in a design. There are different types of macros with regards to how the geometry is placed and how the macro interacts with the calling workspace (or main design, these terms are interchangeable).
Macros allow a user to manually place static or parametric geometry/items in the calling workspace. The macro can allow the workspace to determine where geometry should be placed or allow the main design in the workspace itself to be directly modified.
Macros can function in ARDs or MFGs depending on the macros implementation.
Macros are defined in the Geometry Macro Catalog within ArtiosCAD defaults:
Macros can be added to a design from the Tools > Geometry macros menu:
Types of macros
See this KB article for a description of the types of macros.
Passing information from the calling workspace to the macro
A normal geometry macro can be placed and have data passed to the macro in the following ways:
by the user entering static values that do not change upon a rebuild or using the main design's stylemaker variables that will rebuild the main design and the macro synchronously.
by the user, copying variables from the macro to the top level of the calling workspace. Such an action allows the main design geometry and macro geometry to be rebuilt independently:
The macro can be implemented using precalculated menu (precalculated variables for a geometry macro). Such a menu allows data to be extracted from the main design and utilized within the macro. A macro that calculates the position still does not directly edit the existing geometry within the calling workspace, that is, it is not an in-place macro.
Geometry macro > Registration Marks are examples of macros implemented as placement computed by geometry macro utilizing precalculated menus in stylemaker.
In-place macros
Canalso utilize a precalculated menu (precalculated variables for a geometry macro). This is a good way to simply seed variables defined in the macro with data from the calling workspace.
Geometry macro > Nick legends
ARD with a simple log that executes a command file (NICKLEGEND.ARD --> exe NICKLEGEND.TXT )
ARD with style choice variables (MFGCOATING.ARD) to control the creation of the varnish blankets in MFG using the compiled command MFG.I file (exe MFGCOATINGB FILE MFG)
Macros can be designed to run in the calling workspace for ARDs and MFGs. ..
The macro should be designed for proper use.
Macros are simply ARD workspaces which can be found in the INTSEARCH path (ClientLib, SharedLib, instlib). When working with rebuildable ARDs, the macro ARDs need to exist when the calling workspace is rebuilt. If the user is working within the environment from which the macros were originally added, then they will be found again (assuming the source ARD was not intentionally deleted or moved).
An alternative is to embed the macro into the calling workspace ARD. Under Design > View Parametric Dependencies, the user will see a list of related files that have been utilized in the calling workspace.
Click Embed for the macro.
.
The macro is embedded within the workspace ARD and can be transported to a different environment without concern about the source macro existing in the new environment.
The above is not necessary for placing macros in MFG files. The macro is embedded into the MFG file.