Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Application Server

Lock and unlock template attributes

  • Last UpdatedJan 15, 2025
  • 4 minute read

When you create derived templates, you can lock or unlock some or all of the attributes and enabled features. Locking an attribute prevents it from being changed in derived templates or instances. You can only lock attributes in templates.

Locking an attribute in a template specifies that its value or setting is inherited by all derived objects, both templates and instances. Locking an attribute also makes the attribute act as a constant during runtime.

Note: When you lock values and settings for an attribute, they are not visible when you use Object Wizards, and thus the locked values and settings will be inherited by all derived objects.

Lock icon

In the Attributes page, you must enable locking before an attribute or any of its features can be locked in a template. To enable locking, select the Show/Hide Lock icon to the right of the attribute name. When locking is enabled, lock symbols will appear next to values that can be locked. Lock symbols are not visible in the template or its derived instances unless locking is enabled.

  • Attributes that are locked in a parent template are referred to as "locked in parent." This parent can be at any parent level above the selected object.

  • Attributes that are locked in a template are referred to as "locked in me."

    Caution: When using I/O auto assignment, do not lock the "Read from" field (input source) or "Write to" field (output destination). If you lock these fields in the parent template, they cannot be updated with the resolved reference when the object is deployed and the runtime value will be "---Auto---".

See Group lock and security controls for information about locking or unlocking all of a feature’s attributes with a single click.

Lock controls and status are shown with an icon. If the option is enabled, select the lock control to switch it between locked and unlocked. These icons mean:

Icon

Name

Description

Icon for Locked-in-me

Locked
(in me)

The associated attribute is locked (in me) and enabled. Only templates can have this kind of lock. The attribute value is read/write.

Derived templates and instances do not have a unique copy of this attribute. Child objects share the locked attribute of the parent.

Changing the value of a locked attribute in the parent template updates the value of that attribute in all derived templates and instances.

Icon for locked in parent

Locked
(in parent)

The associated attribute is locked in the parent object and cannot be unlocked or modified by the child object. Both templates and instances can have these. The attribute is read-only.

The templates and objects do not have a unique copy of this attribute, but instead use the attribute value in the parent where the attribute is locked.

Icon Unlocked

Unlocked

The associated attribute is unlocked and enabled. Both templates and instances can have this kind of lock. The attribute is read/write.

The object has its own copy of the attribute value and the value is not shared by derived objects.

Icon for lock status of indeterminate

Indeterminate

Refers to a specified group of options. An indeterminate state indicates different lock states for individual options in the group.

Icon for lock status of undefined

Undefined

The associated attribute doesn't exist. This indicates that another attribute must be enabled before the associated attribute is created and before its lock status can be determined.

Note: Locking an attribute during configuration makes its value a constant. You cannot write to locked attributes during runtime.

Example: Lock an attribute

  1. Create a derived template from the $DiscreteDevice base template. Name the derived template $Valve.

  2. Open the $Valve template and on the States page, lock one of the attributes by selecting the Lock icon.

  3. Save $Valve.

  4. Create a derived template from $Valve. Name it $BigValve.

  5. Create an instance from $Valve named Valve1.

    In the editor of $Valve, the attribute lock icon shows the attribute is locked in me.

    You cannot change the attribute value in $BigValve and Valve1. The editor options for the attribute are disabled and the lock icon, if shown, indicates a lock in the parent. Also, the attribute lock icon in children derived from $Valve is now locked and disabled.

    If you change the attribute value in $Valve, the change propagates to $BigValve and Valve1 after you save the changes.

Example: Unlock an attribute

  1. Using the objects from the previous example, in the $Valve template’s editor, unlock the locked attribute.

  2. Save $Valve.

    In the editor for $Valve, the attribute lock icon shows it is unlocked.

    The lock type for this attribute of $BigValve now indicates locked in me. The lock type for this attribute of the Valve1 instance shows unlocked but the locking icon is unavailable.

    TitleResults for “How to create a CRG?”Also Available in