Writes a schematic window property. If argument 3 is set to 'Create' the function will create the property if it doesn't already exist, otherwise the function can only change the value of an existing property. There are three writeable properties that are built-in, namely 'RootPath', 'Reference' and 'UserStatus'. See the function ReadSchemProp for details.
Schematic window properties may be written to the schematic file so that they become persistent. Specify 'Save' for argument 3 to enable saving to the schematic file.
Number | Type | Compulsory | Default | Description |
---|---|---|---|---|
1 |
string |
Yes |
|
Property name |
2 |
string |
Yes |
|
Propert value |
3 |
string array |
No |
|
Options |
Legal values: 'Create', 'Save'. Note that 'Save' does not imply 'Create'. Both need to be specified to create a saveable property, i.e. ['create', 'save']
Return type: real
The function returns an integer that indicates the success of the operation as follows:
-1 | No schematic windows open |
0 | Success |
1 | Property does not exist and 'Create' not specified |
2 | Property is read only. (e.g. the 'Path' property) |
3 | Property successfully created |
To create a new persistent property: Let WriteSchemProp('myproperty', 'somevalue', ['Create', 'Save'])
|