User Properties
The User Properties panel allows the user to create and define custom properties to Equipment with a specified storage type.
Added in Ver7.1 is the Group field which allows user properties to be grouped.
User Properties can be managed in Sym3 using the User Properties panel that can be accessed from Ribbon > Home > User Properties
Since these properties are assigned to equipment as a group then all equipment in that group will have this property. This can be used to store persistent information in a project such as equipment identification values, Barcodes on product etc.
Add a new user property
Press the plus symbol (+) to add a new user property
When adding (+) a new property the user is prompted for the ‘Owner’ (equipment group) for this property. Every member of this group (and any that are added in the future) are assigned this property.
The selectable list of ‘Owners’ is all the equipment in the Toolbox plus ‘Product’.
Delete selected user properties
Press the minus symbol (-) to delete the currently selected User Property. You will be asked to confirmation the selection is correct.
- Search: The Panel has a Search and filter box that allows the user to select Property names that match the specified filter. An empty search box shows all items. e.g. ‘Bool’ would only show the entries ‘BooleanBusy’ and ‘Userbool’ if these were the only added properties that included the string ‘bool’. Each User Property entry allows setting of the following attributes;
Grid:
- Name: Free form name for the property. The name MUST be unique and is case sensitive. e.g. ‘UserBool’ and ‘Userbool’ are different properties.
- Data Type: The storage type for the property. This can be selected from one of;
- String: A text string. e.g. ‘Default’
- Integer: A whole number, negative or positive e.g. -34
- Double: A decimal number, negative or positive e.g. -0.0567 or 5E-3
- Boolean: True or False
- Group: Allows user properties to be grouped by this field. If empty then the user property will be in the ‘Default’ group.
- Description: Free form text for the description of this property.
Once a Data Type for a user property is assigned it can not be changed. You must delete the property and add it using the correct Data Type.
There is no limit to the number of User Properties that can be added and the User Properties are saved with the project.
If a selected equipment has User Properties defined then these can be viewed and edited in the ‘User Properties’ section of the Property editor.
Example of grouping user properties:
Simulation Scripting
Any User defined Properties added are accessible through scripting to read and update the values. Refer to the example code below.
Example
Reading and setting user properties
var allProds = GetComponents("Product");
for (i=0; i < allProds.length;i++) {
if (allProds[i].GetUserProperty("IST") == undefined)
allProds[i].SetUserProperty("IST", 0);
...
}