Syntax and Examples

In this section, code snippets are presented that illustrate how to accomplish specific tasks necessary for setting up an analysis. These demonstrate the usage of the classes and associated properties and methods described above.

Note that methods are easily identified because they are followed by an argument in brackets. If there are no arguments used, then the method is followed by empty brackets. The exceptions are the “new” methods. These create a new object and assign it a name.

Properties are easy to identify because they are not followed by brackets, and because they are followed by an “=” sign.

In every instance of a method or property, the owning object is prepended. For example:

To assign a name to the object a1, use this:

a1.name = "valve";

To omit the object type, as shown below, is incorrect, and will end in an error:

name = “hvac”;

In many of the examples, comments are added to the script for clarity. Comments are added by preceding lines with “//” .

A semi-colon “;” must appear at the end of lines that are not comments.

Line-by-line explanations are also included below for instructional purposes. These are preceded by a “>>>” character. Note that these notes are not part of the script, but are included as description.