Symbols with several predefined shapes can be defined. For example, you can define ten shapes for a symbol representing a seven-segment display, one for each number that can be displayed on the display.

The different shapes of the symbol are obtained by displaying or hiding some details. For example, in the case of a seven-segment display, the shapes corresponding to the 10 digits can be obtained by displaying or hiding the individual objects representing the display segments.

The different shapes of a symbol are specified by internal attributes belonging to the category SHAPE.

To select one of the available shapes

To select the shape to display, do one of the following:

  • Select the symbol and right-click on it to display the menu and then choose the shapes listed in the Shape submenu.

  • Open the symbol properties window and select the desired shape in the Shape box.

To define a new shape

To define a new shape of a symbol present in a drawing or in a pattern, perform the following operations:

  1. Open the symbol properties window and select the Attributes tab.

  2. Select the category SHAPE and add a new attribute with the shape description.

To define a new symbol shape in a symbol library, do the following:

  1. Open the properties window of the Frame object that defines the symbol.

  2. Select the Attributes of the symbol tab.

  3. Select the category SHAPE and add a new attribute with the shape description.

Description of the shape of a symbol

The different shapes of a symbol are defined by internal attributes belonging to the category SHAPE. The attribute name represents the name of the shape. The value of the attribute contains the text string describing the shape.

Default shape

You can specify a default shape by placing an asterisk as the first character of the name. In the absence of a default shape, the first available one is set.

Syntax of the shape description string

The text string that describes the shape of a symbol consists of directives and identifiers. The directives specify the type of operation to be performed on the elements indicated by Identifiers. If you specify multiple operations, separate them with Commas.

AttenzioneSyntax:
<op>[,<op>]*

Where op represents an operation described by a directive and identifiers or an operation to be performed on a subgroup. You can select the shape of a subgroup of objects by specifying the identification code of the group followed, enclosed in round brackets, by the string describing the shape.

AttenzioneSyntax:
<groupId>(<op>[,<op>]*)

The identifiers

The elements that can be referenced in a shape-description string are the graphical objects that compose the symbol and the internal attributes of the symbol.

Element

Identifier

Graphic objects

Graphic objects are identified by their identification code. The identification code of an object is the value specified in the internal attribute ObjID belonging to the category OBJECT. All objects belonging to the symbol for which no identification code is specified will not be affected by selecting one of the defined shapes.

Internal attributes of the symbol

The internal attributes of the symbol are identified by their name. In case of ambiguity the name of the symbol can be followed after the character '/' by the category name.

The directives

The shape description string can contain the list of objects to be displayed or hidden, or it can specify the new color of an object or modify the content of a text.

Directive

Action

Description

View and hide objects.

If no directive is present, the string must contain the list, separated by a comma, of the identification codes of the objects to be displayed.

For example:

id1,id2,id3

indicates that only objects identified by: id1, id2 and id3 should be displayed.

If the list is preceded by the + character, the objects shown are displayed in addition to those that are currently visible.

If the list is preceded by the character - the objects indicated are hidden.

If the list is preceded by the character = the objects indicated remain unchanged.

For example:

+id4,id5,-id2

the objects currently displayed are: id1, id3, id4 and id5.

If the string contains only the character + all objects for which an identification code is defined are displayed.

If the string contains only the character - all objects for which an identification code is defined are hidden.

If the symbol contains groups of objects, you can select the shape of a group of objects by specifying the identification code of the group followed, separated by the character /, from the shape name.

For example:

r1c1/on

selects the form "on" of the group with id equal to r1c1.

If the symbol contains groups of objects, you can select the shape of a group of objects by specifying the identification code of the group followed, enclosed in round brackets, by the string describing the shape.

For example:

r1c1(+id1,id2,id3,-id4)

displays the objects id1,id2,id3 and hides the object id4, all belonging to the group with id equal to r1c1.

%T

Modify the text of objects.

The syntax is as follows:

%T(id1,id2, ... idN)"new_text"
%T(id1,id2, ... idN)$name

The id parameter is the identification code of the Text or Paragraph to be modified, if you specify more than one object, separate them with a comma.

The new_text parameter represents the new text.

The name parameter represents the name of the attribute from which to read the new text. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

For example, the string:

%T(id1)"ALFA",%T(id2)$BETA/GAMMA

sets the text of the id1 object with the ALFA string and that of the id2 object with the value of the BETA attribute of the GAMMA category.

%A

Change the value of the attributes.

The syntax is as follows:

%A(an1,an2, ... anN)"new_value"
%A(an1,an2, ... anN)$name

The an parameter is the name of the attribute to be changed, if you specify more than one name, separate them with a comma. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

The new_value parameter represents the new value of the attribute.

The name parameter represents the name of the attribute from which to read the new value. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

For example, the string:

%A(an1)"ALFA",%A(an2)$BETA/GAMMA

sets the value of the attribute an1 with the string ALFA and that of the attribute an2 with the value of the attribute BETA of the category GAMMA.

%P

Set the pen style.

The syntax is as follows:

%P(id1,id2, ... idN)style
%P(id1,id2, ... idN)$name

The id parameter is the identification code of the object to be modified, if you specify more than one object, separate them with a comma.

The name parameter represents the name of the attribute from which to read the text string describing the style. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

The style parameter is a text string describing the style of the pen. It can be one of the following:

  1. handle
    Represents the Style Handle of a pen style. See Style manager.

  2. color
    The color must be specified in the ARGB form by a 32-bit number. See ARGB color model.

  3. width
    Represents the thickness of the pen. A number including the decimal separator point must be specified even if the decimals are zero.

  4. color/width
    Both the color and thickness of the pen are specified, separated by the / character.

%B

Set the filling style.

The syntax is as follows:

%B(id1,id2, ... idN)style
%B(id1,id2, ... idN)$name

The id parameter is the identification code of the object to be modified, if you specify more than one object, separate them with a comma.

The name parameter represents the name of the attribute from which to read the text string describing the style. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

The style parameter is a text string describing the style of the fill. It can be one of the following:

  1. handle
    Represents the Style Handle of a fill style. See Style manager.

  2. color
    The color must be specified in the ARGB form by a 32-bit number. See ARGB color model

%C

Set the color.

The syntax is as follows:

%C(id1,id2, ... idN)style
%C(id1,id2, ... idN)$name

The id parameter is the identification code of the object to be modified, if you specify more than one object, separate them with a comma.

The name parameter represents the name of the attribute from which to read the text string describing the style. In case of ambiguity, you can add to the name, separated from the character /, also the name of the category.

The style parameter is a text string describing the color. It can be one of the following:

  1. handle
    Represents the Style Handle of a color. See Style manager.

  2. color
    The color must be specified in the ARGB form by a 32-bit number. See ARGB color model.

%R

Execute a macro.

The syntax is as follows:

%R(macroId)

The macroId parameter is the macro identification code. The file containing the macro procedure must be specified in the ObjRun attribute. See To create dynamic symbols.

See also