How can user-defined method items in scripts be called?

Since user-defined items can be identified only by their GUID, user-defined type numbers should be avoided in the code when writing and running scripts. From ARIS 7.0.x, ARIS Script provides methods that you can use to determine the GUID from the symbol number, and vice-versa. For accessing the user-defined items, we recommend that you use these methods because errors can otherwise be caused in the scripts by incorrect type numbers.

int [MethodFilter].UserDefinedSymbolTypeNum (String sGUIDUserSymbolType)

int [MethodFilter].UserDefinedModelTypeNum (String sGUIDUserModelType)

int [MethodFilter].UsUserDefinedAttributeTypeNum (String sGUIDUserDefinedAttribute)

int [MethodFilter].UserDefinedAttributeValueTypeNum (String sUserDefinedAttributeGUID, String sGUIDUserDefinedAttributeValueGUID)

A type number is set like a variable.

Examples

Further down in the script, you can use SYMBOL_1 as before.

Only if the old symbol type numbers are used directly in the script you need to adapt them manually in the script. In this case, use the variable instead of the number.

If(occ.SymbolNum()==SYMBOL_1)

{

}

The default symbols retained their number and can continue to be used. If many scripts need to be migrated you can transfer the function to a js file that is imported by all scripts. You find additional information under Help > ARIS Script.