Attribute pragmas
Attribute pragmas are used to influence compilation and precompilation.
TwinCAT supports a number of predefined attribute pragmas. In addition, you can use custom pragmas, which you can query by using conditional pragmas before compiling the project.
![]()  | If you define your own attributes, make sure they are unambiguous. You can achieve this by assigning a prefix to the attribute name, for example.  | 
Attributes are defined in the declaration part. Exception: You can only use attributes in Action or Transition objects if the implementation language of the action or transition is “Structured Text (ST)”. Since actions and transitions do not have a declaration part, you define attributes at the start of the implementation part.
Further Information
- User-defined attributes
 - Attribute 'c++_compatible'
 - Attribute 'call_after_global_init_slot'
 - Attribute 'call_after_init'
 - Attribute 'call_after_online_change_slot'
 - Attribute 'call_on_type_change'
 - Attribute 'conditionalshow'
 - Attribute 'conditionalshow_all_locals'
 - Attribute 'const_replaced', attribute 'const_non_replaced'
 - Attribute 'dataflow'
 - Attribute 'displaymode'
 - Attribute 'enable_dynamic_creation'
 - Attribute 'estimated-stack-usage'
 - Attribute 'ExpandFully'
 - Attribute 'global_init_slot'
 - Attribute 'hide'
 - Attribute 'hide_all_locals'
 - Attribute 'init_namespace'
 - Attribute 'init_on_onlchange'
 - Attribute 'initialize_on_call'
 - Attribute 'instance-path'
 - Attribute 'is_connected'
 - Attribute 'linkalways'
 - Attribute 'memory_check'
 - Attribute 'minimal_input_size'
 - Attribute 'monitoring'
 - Attribute 'monitoring_display'
 - Attribute 'no_assign', Attribute 'no_assign_warning'
 - Attribute 'no_check'
 - Attribute 'no_copy'
 - Attribute 'no_explicit_call'
 - Attribute 'no_virtual_actions'
 - Attribute 'no-exit'
 - Attribute 'noflow' / 'flow'
 - Attribute 'noinit'
 - Attribute 'obsolete'
 - Attribute 'pack_mode'
 - Attribute 'parameterstringof'
 - Attribute 'pin_presentation_order_inputs/outputs'
 - Attribute 'pingroup'
 - Attribute 'qualified_only'
 - Attribute 'reflection'
 - Attribute 'strict'
 - Attribute 'subsequent'
 - Attribute 'Tc2GvlVarNames'
 - Attribute 'TcCallAfterOutputUpdate'
 - Attribute 'TcContextId'
 - Attribute 'TcContextName'
 - Attribute 'TcDisplayScale'
 - Attribute 'TcEncoding'
 - Attribute 'TcHideSubItems'
 - Attribute 'TcIgnorePersistent'
 - Attribute 'TcInitOnReset'
 - Attribute 'TcInitSymbol'
 - Attribute 'TcLinkTo' / 'TcLinkToOSO'
 - Attribute 'TcNcAxis'
 - Attribute 'TcNoSymbol' / 'tc_no_symbol'
 - Attribute 'TcRpcEnable'
 - Attribute 'TcRetain'
 - Attribute 'TcSwapDWord'
 - Attribute 'TcSwapWord'
 - Attribute 'to_string'
 - Attribute'TcPersistent'
 
