Templates Document

Parent Previous Next

Templates Document

Users can create an object which can be used in any graphics on the project.


A Templates document is almost identical to the Graphics document.



Properties:


Size: Configures the size of the Template Document (Width and Height).


Keep Background Size: Configures whether the background of the document will be included in the instantiated objects or not.


Can Resize: Configures whether the object can be resized in Graphics documents or not.


Object Tags: Defines a variable wich links a tag between Objects.


On Change: Configures a script that will be executed every time the specified Object Tag change its value. The button color changes on some cases:


- If there is no script


- If there is no error in the script


- If there is error in the script



We will use an example to show the functionality of a Template:



Example:


In this example, we will create a gauge that can be used in any graphic.


In the Template Document properties Grid, go to the Object Tags and create "GaugeAngle" type Integer, like the image below:



Create two images, one of a gauge and the other of a pointer.



Left click the pointer image, click to show center marker and adjust it to be in the axis of rotation.



Align the pointer image with the center of the gauge.



Rotate the pointer manually, and in the properties grid of the pointer image set the relative angle(Tag) to "#GaugeAngle" and last, save the document with the name "Gauge".



To use the Template in the graphic see Template Object.