Updated Array Entry Capabilities
Update: Mods to File=... Option for Array Properties
In preparation for some upcoming new capabilities and to make it easier to import general CSV files, some features have been added to the options for defining array properties with the 'file=...' syntax.
Standard Ways to Define Array Properties
Arrays can be defined by the following methods:
•Entering the numeric values directly
...mult=[1, 2, 3, 4, ...]
•Entering the numbers from a single column text file:
...mult=[File=MyTextDataFile.CSV]
•Entering the data from a packed binary file of doubles:
...mult=[dblFile=MyFileOfDoubles.dbl]
•Entering the data from a packed binary file of singles:
...mult=[sngFile=MyFileOfDoubles.sng]
Enhanced Syntax
The 'File=...' capability has been enhanced. Two options may be added if you want to extract a column of data from a multicolumn CSV file (like you might get from Excel or the OpenDSS Export command). The complete syntax is:
...mult=[File=myMultiColumnFile.CSV, Column=n, Header=Yes/No]
Enter n for the column number you want. The default is always set to 1 for each array.
Specifying Header=Yes causes the first record in the CSV file to be skipped. This allows for a single line of non-numeric data in the first line, as is common in OpenDSS Export files. Default is No.
Example
New Loadshape.Ramp2 npts=4000 sInterval=1 mult=(file=MultiChannelTest.csv, column=3, header=yes)
Reserved File Name
The name %result% is now used to designate the last result file. For example, if you want to export a file (such as a monitor file) and then immediately read in column 5 to do something with, you could do it with the following syntax:
...mult=[File=%result%, Column=5, Header=Yes]
This must be executed before another command is issued that writes a result file.