createAttr

Syntax

<Path>.createAttr(AttributeName:string, DataType:string) → boolean

The method createAttr creates a user-defined attribute for the object designated by <Path>.

Parameters

  • The parameter AttributeName of data type string designates the name of the user-defined attribute.

  • The parameter DataType of data type string designates its data type.

The attribute will be propagated to all of its instances. Plant Simulation returns false if the new name or the data type are not valid.

Return Value

The return value has the data type boolean.

Example

MyStation.createAttr("lotsize","integer")
MyStation.createAttr("inventoryNo","string")
@.createAttr("Paint","boolean")

Related Topics

Tab User-defined

Create a User-defined Attribute During the Simulation

New