Skip to content

PrefixDefinition

class PrefixDefinition

With the PrefixDefinition object, customer-specific prefixes can be defined. Different types of prefixes can be defined: Variable prefixes, function prefixes, type prefixes and more.

Create PrefixDefinition object

To be able to define the automatically created prefixes, a corresponding configuration object must be created:

image2020-2-5_10-44-4

End with 'Finish'.

image2020-2-5_10-46-9

Configure prefixes

The possibility to define prefixes for different elements in the domain model is now available.

image2020-2-5_10-50-16

applyToControllerLocal / applyToControllerInterface

These two parameters determine whether the automatic prefixes for local variables and for variables in the controller interface should be applied.

standardType

Definition of the prefixes for all standard types available in the model.

Example (define prefix for type BOOL):

image2020-2-5_11-13-44

Creating a variable of type BOOL:

image2020-2-5_11-21-57

Result:

image2020-2-5_11-23-27

Further properties

image2020-2-5_11-37-10

array

Prefix for array variables.

The behaviour of the prefix can also be defined (replace or prefix the type prefix).

recordType

Definition of the prefix for a RecordType and for an instance of a RecordType

enumType

Definition of the prefix for an enum type, for the instance of an enum type and for a value element of an enum type.

functionBlock

Definition of the prefix for a function block and for the instance of a function block.

function

Definition of the prefix for a function.

functionVariable

Definition of the variables prefix of a function or function block.

inOutVariable

Definition of the prefix for digital and analog I/O variables.

globalVariable

Definition of the prefix for global variables.

Applying the automatic prefixes in libraries

To use the automatic prefixes in Datatype or Function Libraries, the functionality must be activated for each library with the attribute 'autoPrefix':

image2020-2-5_11-48-41