Skip to end of metadata
Go to start of metadata

In Rules, the attributes defined for types are displayed under each type under the special Attributes node . To add an attribute for a type, right-click on this icon and choose Add Attribute. You will have to set:

  • The name (unique to each attribute)
  • The type of the attribute (number, text, etc.)
  • Whether the attribute is read-only for GUI changes, whether it should have a unique value
  • Whether the attribute has a default value (applied to new object instances). If this is the case, you can set two aspects:
    • The default value
    • Whether or not the default value is modifiable
  • Whether the attribute is displayed in the Internal Block Diagram
  • Whether the icon and the value of the attribute are displayed in the Internal Block Diagram
  • The icon used in the Internal Block Diagram and in Rules
  • The font used in the Internal Block Diagram
Icon

When you add a new attribute, you should always set the name in the upper Name field. If you set the name in the lower Name field, it will add and modify an existing attribute.

For more information on different attribute types, see Available Attribute Types. For more information on other properties, see Type Attribute Properties.

Icon

You should always begin by choosing the attribute name before setting other parameters. There are two reasons for this:

  • If you set first, for instance, the attribute icon and its visibility, these properties will be lost when you return to naming the attribute.
  • When typing the attribute name, if you pass by an existing attribute name, all the parameters will be set to correspond to this attribute, erasing the values you might have previously set. For example, take a project with an attribute called N of type number. If you try to add a new attribute by selecting the type string and then typing the name Name, the type string will be replaced by the type number.

When you have finished defining your attribute, click on the Add button.

 

  • No labels