Router-CIM Automation Suite

Parametric_Macro_Builder_Header


Parametric_Macro_Builder_Header


Previous topic Next topic  

Parametric_Macro_Builder_Header


Previous topic Next topic  

Global Variables Defined

The GlobalVar Operation contains all the Global variable names, associated formulas and values. Global variables are stored in a file on disk and is reference by all Macros opened by the Macro Builder.

The GlobalVar Operation is the First Operation evaluated by the Macro Builder.

Since Global Variables are the first to be evaluated there are restrictions on the formula used to define a GlobalVar.

Global Variable Formula Restrictions

A Global Variable's formula can only reference previously defined Global Variable names or XDIM, YDIM and ZDIM Panel variables.
A Global Variable name can not be XDIM, YDIM or ZDIM.

Local Variables are evaluated after the Global Variables. Therefore, a Local Variable is not defined while the Global Variables are being evaluated. The Panel variables XDIM, YDIM and ZDIM are evaluated prior to the Global Variables and therefore can be referenced when defining a formula for a Global Variable.

Reference the Local Variables Help section for details on Formula formatting.

Global Variables affect all Macros opened by the Macro Builder

Global Variables are used by all Macros opened by the Macro Builder.
Any edits to the Global Variables are always saved to disk and will appear in any Macro opened by the Macro Builder.

Global Variable Naming Conventions

Variable names can not be a LISP function name, a CAL function name or any Protected Variable name defined by the Macro Builder
Characters used to define a variable name must begin with a letter and can not contain special character like <blank>=/<>[]{}()+-*~^

Reference the AutoCAD Programmers Reference manual for Lisp function description.

Reference the CAL command in the AutoCAD User Help for CAL function names.

Reference the Router-CIM file pv.dat for a list of protected variable names. Add names to this file using a ascii editor when necessary. The validation process in the Macro Builder will use this file when validating edits on Accept.

GlobalVar Interface

Mac_Editor_Global_Variables

Global Variables are presented in a grid format. The currently selected variable is indicated by an arrow in the numbered selector, contents are bold type and the grid row appears in a highlighted color.

To Edit an existing variable simply select the Name or Formula field and make the desired edit. Selecting the Result field will not cause an edit. The Result field is the results determined by evaluating the Formula. This occurs after the acceptance of the edits.

To Add a New variable select the Name field next to the last un-numbered row that has an * as its selector. Enter the name, press TAB key and enter the formula.

The Name and Formula fields support the Windows Clipboard. Right Click on the field and the Clipboard menu will display.

Note: the Notes field are not saved in the global variables file. They are saved in the database.

Grid Row Editing

GridEditOptions

Right Click on the Grid with display the Edit Menu.

The Edit menu provides for several different methods to edit the row sequence. These methods are available or not available depending prior edits. When an Edit method is not correct for the selected row, the method will be "grayed out" and not selectable.

These Edit methods are not to be confused with the Windows Clipboard functions. The changing of the grid row is controlled by the Macro Builder using its own internal functions. Even though the methods are similar to Clipboard functions these Edit methods are not Clipboard functions. You can not Copy rows and paste them into another application.

All Edit methods support multiple selection of rows. Multiple selection is performed by hold the Shift or Ctrl key while selecting multiple operations.

 

Grid Row Editing Methods

Copy - will make a copy of the selected rows and store those rows in a temporary buffer to be inserted back into the grid at another row location.
Insert - if the temporary buffer contains operations that have been copied or removed, this will insert the collected rows at the ( before ) current selected row.
Remove - will place the selected rows into a temporary buffer and remove the selected rows from the grid. These rows can be insert back into the grid at another row location.
Delete - will delete the selected rows from the grid permanently. A Yes/No question will be asked to validate that you want to delete. No Undo is available.
Move - by picking on a numbered selector on the left of the variable name AND holding down the mouse left button the dragmovecursor drag cursor will appear. Move the selected rows up/down in the grid to a new location.

Grid Cell Editing

After changing a cell content press the TAB key to accept the edit and go to the next cell in the row or press the ENTER key tp accept the edit and go to the next row.