Save your own project symbols

A symbol is a set of one or more screen objects that is saved in the Symbols library, so that you can reuse it in your projects.

Every time you reuse a symbol, you actually make a copy that is linked to the master symbol in the Symbols library. (These linked copies are also called “instances” of the symbol.) Thereafter, if you make any changes to the master symbol, those changes automatically propagate to every linked copy in every project.

You can customize each linked copy of the master symbol by defining Custom Properties. For example, when you create a gauge that displays tank levels and then save that gauge as a master symbol, you can define custom properties on the symbol that will allow each linked copy to display the level of a different tank.

Figure 1. Project Symbols folder in the Graphics tab
Web Studio Help tech0523 Save your own project symbols

Create a master symbol

To create a master symbol and save it to the Symbols folder:

  1. Design your symbol just as you would normally draw a project screen, using any combination of Static and Active Objects. For example, three check boxes in a rectangular pane:
    Figure 2. Drawing objects in a project screen
    Web Studio Help techref0546a Save your own project symbols

  2. Select the object(s) or Group that you want to save as a symbol.
    Figure 3. Selecting the objects
    Web Studio Help techref0546b Save your own project symbols

    Note: It is not necessary to make a Group out of two or more objects before saving them as a symbol. Saving the objects together as a symbol effectively groups them.

    There is a situation, however, where you may want to group the objects first. A symbol can have only one hint. If more than one object has a hint configured on it (in the Object Properties), those hints are not shown when the objects are saved together as a symbol. To specify a hint for the symbol as a whole, you must first group the objects and then configure the hint on the Group. That hint will carry through when you save the Group as a symbol.

  3. Right-click on the selection, and then click Create Linked Symbol on the shortcut menu.
    Figure 4. Creating a linked symbol
    Web Studio Help techref0546c Save your own project symbols

  4. A standard Save As dialog box is displayed, and you are prompted to give the new symbol a file name. Symbol files (*.sym) are saved in the Symbol folder of your project.
    Figure 5. Saving the symbol file
    Web Studio Help techref0546d Save your own project symbols

  5. Click Save to save the file. The symbol appears in the Project Symbols folder, in the Graphics tab of the Project Explorer.
    Figure 6. Symbol file in the Project Explorer
    Web Studio Help illus custom properties 14 Save your own project symbols

    The symbol also appears in the Project Symbols folder of the Library.

The symbol is now ready to be reused in your project, but the way it is currently saved, every copy will have identical properties. You must now define custom properties on the symbol — that is, the properties you want to be able to customize each time you reuse the symbol.

Edit the master symbol

You can edit a master symbol after you’ve initially saved it, to add or delete objects in the symbol or to define custom properties on it. Remember that any changes you make to the master symbol will automatically propagate to every linked copy in every project.

Note: There is one exception. If you change the hint on a symbol — as described in “Create a master symbol” — then the change will appear only on new instances of the symbol. Existing instances will be unchanged.
To edit a symbol:
  1. Right-click on the symbol file in the Symbols folder, and then choose Edit from the shortcut menu.
    Figure 7. Editing the symbol file
    Web Studio Help illus custom properties 15 Save your own project symbols

    Tip: You can also right-click on any instance of the symbol and choose Edit Linked Symbol from the shortcut menu.
    The symbol file is opened for editing in its own window. This symbol editor works in the same way as a regular screen editor, except that every object in the window is part of the symbol. If you add, move or delete objects in the symbol editor, you may change the size or shape of the symbol and disrupt the layout of any Screens where it is used.
    Figure 8. Symbol file opened for editing
    Web Studio Help techref0546g Save your own project symbols

    Besides adding, moving or deleting objects in the symbol, you can also edit the Object Properties as you normally would. You may want some properties to be the same in every instance of the symbol, but other properties need to be customized according to where and how the symbol is used. In this example, you probably want to customize the captions for the three check boxes, the tags with which the check boxes are associated, and the caption for the pane itself.

  2. Select the first object in the symbol and open its Object Properties. For example, the first check box:
    Figure 9. Object Properties dialog box for the first Check Box object
    Web Studio Help techref0546h Save your own project symbols

  3. In any field where you would normally configure a tag, expression, or value, you can instead define a custom property using the sytax…
      #[Category.]Property:[Value]  
    …where:
    • Category is an optional name for a collection of related properties, such as all captions or all Check Box values. If you do not specify Category for a property, it will be automatically listed under the “Main” category.
    • Property is a label to identify the specific property. Property is required for each property, and it must always be followed by a colon (:).
    • Value is an optional default value for the property.
      Note: All Tag/Expression syntax rules apply to Value, including tag names, pointers, arrays, strings, numerical and boolean values, and scripting functions.
    In the following example, we want to be able to customize which tag will be set when the Check Box is selected or cleared. So, in the Tag field, type #Option1.Tag: as shown.
    Figure 10. Defining a custom property for the Tag property
    Web Studio Help illus custom properties 01 Save your own project symbols

    When you go to complete the properties on an instance of the symbol, #Option1.Tag: will appear like this:
    Figure 11. Custom properties on a symbol
    Web Studio Help illus custom properties 02 Save your own project symbols

    But more about that later…

  4. Depending on the context, some object properties require a specific type of value like a String, a Boolean or a numerical value. For these properties, you must enclose the custom property declaration in curly brackets ({}).
    In this example, the Caption field requires a String, so type {#Option1.Caption:”Option 1″} as shown.
    Figure 12. Defining a custom property for the Caption property
    Web Studio Help illus custom properties 03 Save your own project symbols

    Again, when you go to complete the properties on an instance of the symbol, they will appear like this:
    Figure 13. Custom properties on a symbol
    Web Studio Help illus custom properties 04 Save your own project symbols

  5. Repeat steps 2 through 4 as needed, to define the rest of the custom properties on the symbol.
    In this example, the finished symbol has all of the following properties:
    Figure 14. Custom properties on a symbol
    Web Studio Help illus custom properties 05 Save your own project symbols

  6. Save the symbol and close the symbol editor.
  7. On the Home tab of the ribbon, in the Tools group, click Verify. This will update all existing instances of the symbol in your project.

Add tooltips to custom properties

You can configure a description for each custom property available in the symbol. After creating a symbol, open it with the symbol editor, right-click in the symbol editor (not on the symbol itself) and choose Edit Symbol Properties from the shortcut menu.
Figure 15.
Web Studio Help tech0527 Save your own project symbols

When assigning values to the custom properties of the symbol on the screens, the user can read the description as Tooltips just by moving the mouse cursor on the property name, as illustrated on the following picture:
Figure 16. Tooltip showing the description of the property
Web Studio Help tech0528 Save your own project symbols

Password protect a symbol

You can put a password on any of your user-made symbols to prevent them from being edited or analyzed by other users. To protect a symbol:

  1. In the Symbols folder, right-click on the desired symbol file (.sym) and then choose Password Protection from the shortcut menu. A Password Protection dialog box is displayed.
  2. In the New Password field, type your password.
  3. In the Confirm Password field, type your password again.
  4. Click OK.

Once this is done, you will be prompted for the password whenever you attempt to edit the symbol or unlink an instance of the symbol.

Make a user-made symbol available to other projects

User-made symbols are normally available only in the project where they were initially created and saved. However, you can send a user-made symbol to the System Symbols folder of the Library, to make it available to all of your projects:
  1. In the Symbols folder of the Project Explorer, right-click the desired symbol file ( .sym ) and then choose Send to System Symbols from the shortcut menu. A standard Save As dialog box is displayed, automatically pointing to the Symbol sub-directory of the IWS program directory instead of the Symbol sub-folder of your project folder.
    Figure 17. Saving a symbol
    Web Studio Help dialog save as symbol Save your own project symbols

  2. Choose a location in which to save the symbol file. You can choose one of the existing categories/folders, or you can create a new one.
  3. Click Save. The symbol file is saved in the specified location and the symbol is displayed in the System Symbols folder of the Symbols library.
    Figure 18. Saving a symbol
    Web Studio Help illus custom properties 12 Save your own project symbols

For more information, see Using the Library.

Insert a symbol in a project screen

To insert a symbol in a project screen and then complete its custom properties:

  1. Open the desired project screen from the Screens folder, or insert a new screen. The screen is opened for editing.
  2. Open the Symbols Library by doing one of the following:
    • On the Graphics tab of the ribbon, in the Libraries group, click Symbols;
    • Double-click Symbols in the Project Explorer; or
    • Right-click in the screen where you want to insert the symbol, and then click Insert Linked Symbol on the shortcut menu.
  3. Select the symbol from the Symbols Library, and then click in the screen:
    Figure 19. Symbol placed in a project screen
    Web Studio Help illus custom properties 06 Save your own project symbols

    Once the symbol is inserted, you can manipulate it like any other object in the screen. You can align and distribute it with other objects, and you can apply Animations to it. However, the first thing to do is complete the custom properties for this instance of the symbol.
    Figure 20. Object Properties dialog box for the symbol
    Web Studio Help illus custom properties 07 Save your own project symbols

  4. Open the Object Properties for the symbol.
  5. Click Expand to open the Symbol Properties dialog box.
    Figure 21. Symbol Properties dialog box for the symbol
    Web Studio Help illus custom properties 08 Save your own project symbols

    To see all of the properties at the same time, select the Display properties from all categories check box.
    Figure 22. Displaying properties from all categories
    Web Studio Help illus custom properties 13 Save your own project symbols

  6. Enter the property values as needed. In this example, the three check boxes are used to determine whether to alert Tom, Dick and/or Harry. The captions are updated accordingly, and the check box tags are configured with the first three elements of a Boolean array called AlertOptions.
    Figure 23. Completed properties for the symbol
    Web Studio Help illus custom properties 10 Save your own project symbols

  7. Click OK to close the Symbol Properties dialog box, and then close the Object Properties dialog box.
The custom properties are resolved during runtime, as shown below.
Figure 24. Symbol during editing (top) and run time (bottom)
Web Studio Help illus custom properties 06 Save your own project symbols
Web Studio Help illus custom properties 11 Save your own project symbols

Note: Remember, the completed custom properties on each instance of a symbol are independent from every other instance of that symbol, but if you make any changes to the master symbol file, those changes automatically propagate to every instance.

Save your own project symbols