This may be helpful in creating custom symbols for perspective. SVGs allow changing of fill colors, etc., dynamically.
- Create your SVG using your favourite program. In this example I’ve used Inkscape.
- Hit Ctrl-Shift-D to set the document properties and set the units and grid. I chose a 1 mm grid. Take a little care with this so that you can be consistent with your work.
- Draw your symbol. Use the Z-order buttons to push objects back and forwards in the stack.
- Hit Ctrl-Shift-F to edit the fill and stroke of the objects. Pick a “wrong” color so that you can be sure your changes are working later in Ignition.
- Hit Ctrl-Shift-O to name the objects. The names you assign here will show up in Perspective.
- Select the objects and hit Ctrl-Shift-R to set the bounding box for the objects. This will crop the viewBox tight to the size of your graphic.
- Save As … plain SVG. (I didn’t test whether or not Perspective can handle Inkscapes SVG format which contains extra Inkscape info.)
- Drag and drop the image using File Explorer onto a Perspective view.
- Create a custom property. Here I’ve set the fill color using on of the theme colours.
- In step 3 in the image above create a binding to whatever will drive the color property. Note again that I’m using theme colors rather than hard code them.
- Finally, bind each of the SVG element’s fill properties to the custom property we set above. (You could skip the custom property completely but I think doing it this way means you only have to set it once at a high level.)
I hope someone finds this useful.