- Edit existing templates
Create a new template
- Create a new blank drawing in Visio.
Add all the required elements in the background of the diagram (the background is opened in the Drawing Explorer).
a. To ensure the accurate positioning of shapes when the size of the diagrams vary too, use the Visio ShapeSheet. There you can define relative positions (= relative to the page size) which hold the shape in place even in sizes different from the diagram template. Example: a shape (e.g. the logo) should always be displayed in the upper right corner, no matter how wide the diagram is. As an example we use an A4-landscape in landscape format; the following values should be stored in the ShapeSheet:
- PinX: ThePage!PageWidth \ 3 cm*
- PinY: ThePage!PageHeight \ 2.5 cm*
When relative positions have been set for a shape, they will not be lost, if the shape is moved via ShapeSheet, but for example manually moving it with the mouse or the cursor keys will change relative positions (PinX and PinY)!
<div class="warning"> Attention: When a template is saved with an open background, that means that you will be modelling also in the background. This can lead to problems and unexpected behavior patterns. Please make absolutely sure that you have always selected the forefront in drawing Explorer before saving the template! </div>
Open all required stencils for this template.
Save the template (.vstx *) as such.
When a new diagram is created with this template, your layout and the selected stencils are used automatically.
Equip the selected shape with diagram or unit properties and display them as in the Template
Show diagram or unit properties on the template
When creating the diagram template (* .vstx file), you can display diverse process4.biz- properties on Visio shapes. When you then create a diagram based on the template, the respective property values are displayed on the shapes automatically.
Equip a shape with process4.biz properties
In order to create these shapes automatically, you should be logged in process4.biz. Open then the Visio template, create a shape, and select in the context menu under “Equip with process4.biz properties” one of the following functions:
Equip the shape with unit properties of process4.biz
You can equip the shape with the desired properties of the unit where the diagram is created.
Equip the shape with diagram properties of process4.biz
The shape can be displayed with any diagram properties automatically such as name, owner, created on etc.
Mark the shape as placeholder for the diagram name
Select this option if you want to display the name of the diagram on the shape (the name display can also be created manually as shape data field “p4b_diagram_Name” in the ShapeSheet). When you select this option, the value is displayed as text in the shape.
Mark the Shape as placeholder for the PARENT diagram name
Select this option if you want to display the name of the superordinate diagram (Parent diagram) on the shape (the name, however, can also be manually created as shape data field “p4b_diagram_ParentName” in the ShapeSheet). When you select this option, the value is displayed as text in the shape.
To display the selected property as a text box on a shape, add the corresponding field to the shape in question:
At the next screen, select the desired entry (= the added property) from the category “shape data”.
In the dialog box for equipping a shape with diagram or unit properties, it is not only possible to select existing properties: here you can create new properties or edit existing ones directly - without the detour via the Database Designer. (Caution: design rights are required).
The properties added to a Shape are often displayed only after saving the diagram.
Display static text with a property
After successfully adding a property to a shape, open the ShapeSheet. Look for the table “Text Fields” and enter the following in the field “Value” for the corresponding property:
= "Class" & Prop.p4b_diagram_ClassID
Thus, you will not only display the class of each diagram, but have also included a statement from the displayed property value.
The same sort of syntax of course, can also be applied to all the other properties of the shape added.
A text box in the ShapeSheet
To view the property as Shape Data Graphics, select the function “Data” and then “Edit Data Graphics” in the context menu of the corresponding shape. Here you define the view of the data graphics (these can contain text, a data bar, an icon or a color, depending on the value). See: Displaying Properties as Visio Data Graphics
Create templates in multiple languages
To create diagram templates in different languages and to make them available, proceed as follows:
The templates should be aligned in a folder structure according to language
Here an example of this:
xml Stencils\ de\ RACI.vstx RACI.vssx en\ RACI.vstx RACI.vssx
Names of language-specific folders are, for example, “en” and “de”
The templates of different languages should have the exact same name
If a new diagram is created with active content English language (see Client Settings), the English template is automatically used for the corresponding stencil. In a subsequent language change back to German, the template incl. the stencils will be loaded in German, as soon the diagram is reopened.
Edit existing templates
To edit existing templates, proceed as follows:
Open the relevant template in Visio “File” -> “Open”
- Edit the template according your preference
- After editing the template, please make absolutely sure that you have closed any open diagram background again.
Save the template
- If you have worked with templates from the database or from SharePoint, check them in again.
- Run the Wizard updating diagrams, to apply your changes to already existing charts.