Adding intelligence to an advanced graphic

The svgprogressbar symbol created in Converting SVG images to symbols is essentially the same as the basicprogressbar created in Changing symbol layers. That is, a collection of shapes where one object is expanded to display a change in real world events. The difference is that the svgprogressbar shown in figure An ungrouped SVG image is visually more pleasing than the basicprogressbar shown in figure The region symbol. As you will now see, it is much faster to add intelligence to a symbol made with advanced graphics.
To add intelligence to an advanced graphic symbol, you need to:
  • Choose the object in the graphic to be transformed.
  • Create the parameters necessary for transformation.
  • Bind the parameters to the object.
  • Add conditions if necessary.
The svgprogressbar symbol contains 5 different objects layered one on top of the other. The GeneralPath3 object, as shown in figure An ungrouped SVG image, is a red bar.
To transform this object:
  1. In the Symbol Editor, select the GeneralPath3 object.
  2. Create the following parameters:
    Parameters for the svgprogressbar symbol
    Name
    Type
    Allowed Value
    Allowed Value Name
    Default Value
    maxwidth
    Integer
    100
    max
    max
    minwidth
    Integer
    0
    min
    min
    problem
    Integer
    35
    prob
    prob
    progress
    float
       
    0.1
    For more information, see Adding flexibility using parameters.
  3. Bind the problem, minwidth and maxwidth parameters to the width attribute of the GeneralPath3 object.
    Pay attention to set the Value Max parameter to 345, that is, the maximum width of the bar in pixels.
    diasym_svgsymbinding7.png
    Transformation parameters
  4. Set the same conditions on GeneralPath3 as shown in the Transforming symbols using conditions section.
Note
When you test GeneralPath3 and progress is set to 100, the bar width is 345 pixels.
Symbol graphics created by graphic artists using standard graphics packages have a finer look and feel. Importing advanced graphics into the Symbol Editor means symbols are created faster by the Symbol Editor. To add intelligence to a symbol based on SVG images, use exactly the same methods as you do for a basic symbol. See Planning a project for the Symbol Editor to see the recommended workflow for creating symbols.