Macro commands and parameters

<< Click to Display Table of Contents >>

Navigation:  Macros >

Macro commands and parameters

Each command requires a certain number of parameters. Parameters are given between brackets at the end of a command, separated by commas. A parameter may be a value, an attribute or a collation character.

A value may be text, a number, a logical value (true/false), a switch position (open/closed), a power direction (supply/absorb) or an object. A value may be stored within in a variable or within an attribute associated with an object (e.g. the voltage at a node).

An attribute is an item of input or output data concerning a component within the network. Input data items may be altered and printed in the macro language. Output data items may only be printed.

A collation character is required for logical functions. The following are available in the macro language: = (equals), <> (does not equal), < (less than), <= (less than or equal to), > (more than), >= (more than or equal to). These collation characters may be used in the commands If, While and Until.

 

Commands are available for:

Alteration: changing the network or variables

Arithmetic functions: functions for rounding, square, logarithm an goniometry

Procedures: user defined procedures

Conditional actions: executing or skipping parts of a macro, depending on a value

Loops: repeatedly executing or skipping parts of a macro, depending on a value

Calculation: determining results

Reporting: entering data into Excel cells or formatting them

Input: reading from spreadsheets for a macro execution

Network actions: saving networks modified by the macro

Topological

Python

 

 

See also:

Macro editor

Making calculations with macros

Macro structure and syntax