Method Format
In the following formats, [Opt=x] appearing after a parameter indicates that the parameter is optional and the default value is x.
When calling object-creation methods as functions, parenthesis are required in order to retrieve the name of the created object.
All methods to create Schematic objects have the following form:
Create[type](VARIANT parameters,
// Array of type specific parameters
VARIANT attributes,
// attributes is in the format of:
Array("NAME:Attributes", _
"Page:=", int, _ // [Opt=1] Page number (one-based)
// Note: Page 1 always exists
"X:=", double, _ // X position of the object
"Y:=", double, _ // Y position of the object
"Angle:=", double, _ // Rotation angle (radians)
"Flip:=", bool) // True if mirrored
[out,retval] string id)
The algorithm used in the create methods is:
1) Create SchAdd[type]Command object with parameters passed in
2) Execute the command
All methods to modify Schematic objects have the following form:
[modification](Array("NAME:Selections",
"Page:=", Page number [optional: Default=1]
"Selections:=", IDs to modify see format below),
VARIANT params
// Array of modification specific parameters)
The algorithms in these types of methods will be:
1) Go through ids and get the SelectableObjs they correspond to
2) Select the SelectableObjs found in (1)
3) Select any sub components specified
4) Create the Sch[modification]Command
5) Execute the command
ID Format
When IDs are passed to a function it can be in one of the following formats:
- Array of integers of top-level items only
- String of IDs separated by spaces or commas
- Array of strings with each string element being an ID
Point Format
When a method takes an array of points, each element in the array is a string in the format of: "x y", "x,y", or "(x,y)".