Create a SmartLabel With SmartText Fields - SmartSketch - Help

SmartSketch Help

Language
English
Product
SmartSketch
Search by Category
Help
SmartSketch Version
8.0(2014)

The following workflow shows you how to create a symbol containing a SmartLabel with SmartText fields that display the values of symbol attributes in SmartSketch. This workflow can be broken down into three main processes:

  1. Create a symbol containing the attributes to display.

  2. Create a SmartLabel and edit the SmartText fields to obtain values from the symbol attributes.

  3. Combine the symbol and the SmartLabel into a single, wrapper symbol that can be placed into a drawing file, which is then dissolved, leaving the original symbol and SmartLabel in the drawing file.

The steps required to complete each of the three sections are listed below. Example symbols and attributes are provided so that you can work through the processes.

Create the Symbol with Attributes

  1. Draw the graphics for the symbol. You can draw your own symbol or use a pre-existing symbol delivered with SmartSketch. The figure below represents a tank.

  2. Select the graphics, and then click Create Symbol from the Draw toolbar.

  3. Define the symbol origin.

  4. From the Save as Symbol dialog box, type the symbol name, and then click Save. For this example, use the name Inner_Graphics.sym.

    This is the name of the symbol instance when the SmartSymbol is placed as a discrete object.

    SmartSketch displays the new symbol in the Symbol Explorer. Make sure you are looking in the correct file location.

  5. Click the Inner_Graphics symbol from the Symbol Explorer, and drag it to the toolbar area to open the symbol file for editing.

  6. Click Tools > Add-Ins > Symbol Authoring Tools.

    SmartSketch displays the Symbol Authoring Tools toolbar.

  7. Click Symbol Properties on the Symbol Authoring Tools toolbar.

  8. Click the Attributes tab on the Symbol Properties dialog box, and then enter the attribute values for the following fields:

    • Name - Specifies the name of the attribute to show in the Attribute Viewer.

    • Type - Defines the type of attribute.

    • Value - Specifies the default value for the attribute

  9. Click Add after you enter each value, and then click OK to close the Symbol Properties dialog box.

    For this example, enter the following two attributes:

    Attribute A

    • Name - Tag Prefix

    • Type - Text

    • Value - ?

      Attribute B

    • Name - Tag Number

    • Type - Number

    • Value - 1

  10. Click Save to save the symbol attributes, and then close the symbol file.

  11. Select the original graphics you drew to create the tank, and then press DELETE.

Now you are ready to create a SmartLabel to display the symbol attributes you just added.

Create a SmartLabel Containing SmartText

  1. Click Text Box and type in your text. In the example, type in A-B in the text box.

  2. Select the text box you created, and then click Create Symbol from the Draw toolbar.

  3. Define the symbol origin.

  4. From the Save as Symbol dialog box, type the symbol name. For this example, use the name Inner_SmartLabel.sym.

    SmartSketch displays the new symbol in the Symbol Explorer.

  5. Click the Inner_SmartLabel symbol from the Symbol Explorer, and drag it to the toolbar area to open the symbol file for editing.

  6. With the text box selected, click Paragraph Alignment , and then select the text alignment. For this example, select Center.

  7. Click Edit SmartText on the Symbol Authoring Tools toolbar.

  8. Highlight the A in the SmartText Editor dialog box, and then set the Property, Format, and Value fields for the attribute to display. For the example attribute A, enter the following:

    • Property - Tag Prefix

    • Value - ?

    • Format - String

  9. Click Insert Field after entering the above fields for Attribute A.

  10. Now highlight the B in the SmartText Editor dialog box, and then set the Property, Format, and Value fields for the attribute to display. For the example attribute B, enter the following:

    • Property - Tag Number

    • Value - 1

    • Format - General Number

  11. Click Insert Field after entering the above fields for Attribute B, and then click OK.

    SmartSketch shows the values for A and B in the symbol.

  12. To create the label, click Symbol Properties on the Symbol Authoring Tools toolbar, and then click the Behaviors tab on the Symbol Properties dialog box.

  13. Click Label and Glue to target object options, and then click OK.

  14. Click Save , and then close the file.

  15. Select the original text box in the SmartSketch document, and then press DELETE.

Create the Wrapper Symbol for Placement into SmartSketch

  1. Select Inner_Graphics.sym, representing the tank, from the Symbol Explorer, and then drag it into the document.

  2. Select Inner_SmartLabel.sym from the Symbol Explorer, drag it into the document, and then attach it to the Inner_Graphics symbol.

    You can check the SmartLabel by changing the attribute values in the Attribute Viewer. The value of the text changes in the document.

  3. Select both symbols, and then click Create Symbol from the Draw toolbar.

  4. Define the origin.

  5. From the Save as Symbol dialog box, type the symbol name, and then click Save. For this example, type the name Wrapper.sym.

    SmartSketch displays the new symbol in the Symbol Explorer.

  6. Click the Wrapper symbol from the Symbol Explorer, and drag it to the toolbar area to open the file for editing.

  7. Click Symbol Properties on the Symbol Authoring Tools toolbar.

  8. Click the Behaviors tab on the Symbol Properties dialog box.

  9. Set the Drop as field to Discrete Objects, and then click OK.

    This behavior causes the wrapper symbol to be removed on placement, leaving the individual objects (symbol and SmartLabel) in the drawing file so they can be selected and edited separately.

  10. Click Save , and then close the file.

  11. Select the original graphics, and then press DELETE.

You can now use this symbol in your work to modify and display symbol attribute values.