INPUT, OUTPUT and VAR of a Model can be declared as an array [1..n], and ATPDraw requires the first index to be unity.
Using this can simplify multi-phase handling significantly. The example below shows a 3-phase conversion of data in Cartesian coordinates to Polar. Declaring the INPUT, OUTPUT and VAR as arrays and interacting over them in a for loop simplifies the code considerably.
Vonverts the 3-phase input in cartesian notation into polar
Xre[1..3],Xim[1..3] -- The input signal in cartesian coordinates
Xabs[1..3] -- Magnitude of output
Xang[1..3] -- Angle of output
for i:=1 to 3 do
if (Xre[i]=0) and (Xim[i]=0) --seems necessary to protect agains undefined
Data can also be declared as arrays, still with unity as the lower index but without restriction on the upper index.