Template Editor
- 1 Adding New Template
- 2 Editing Template Elements
- 2.1 Viewports
- 2.1.1 Viewport Information
- 2.1.2 Scale Mode Settings
- 2.1.3 Viewport Highlight
- 2.1.4 Additional Settings
- 2.1.5 Legends
- 2.1.6 Scale ruler
- 2.2 Additional Shapes
- 2.3 Icons
- 2.4 Macros
- 2.1 Viewports
- 3 Multi viewport example
Print Template Editor allows for creating and editing of templates used for printing.
Templates are represented in a specific paper size and consist of viewports designated for drawing content, legend windows, macros and additional texts or icons.
Adding New Template
To add a new Print Template, go to Administrative Panel, Printing and select Templates section. A list of existing templates is shown in the listÂ
You can edit some of the existing templates or add entirely new one.
To add new template, hit the New Button and a new Print Template form will appear:
Fill in the form with the information as follows:
Name: Select any meaningful name for the template. This name will be visible to the user.
Units:Â Select from available units in which the template will be expressed. This will influence margins.
Orientation: Select between Landscape and Portrait orientations. Dual orientation templates are not supported.
Format: Select paper format to be used. Print formats are defined in Printing →  Print Formats
In the Margins section, define desired margins. Value 5 in this example, corresponds to 5 millimeters.Â
You should keep in mind that not all printers support margin-less printouts. A value that should be safe for most printers would be at least 0.25" (6.35 mm).
Editing Template Elements
Viewports
Viewports represent dedicated area in which a drawing content will be loaded. A print template can contain one or more viewports.
Each template must contain at least one master viewport (always with ID 1). That master viewport will be filled in with a view of document that is the main context of specific print job.
Additional viewports will be filled in either by specific objects passed in HOPA call or by Target Object and other viewport settings.Â
When your new template is loaded, you can select and resize the viewport if needed, and also adjust default settings on the Edit Viewport panel.Â
Â
A new Viewport can be added with Add Viewport funtion available on the toolbar:
Viewport Information
This section contains an id and name of the selected viewport. It is created automatically and cannot be edited.Â
Scale Mode Settings
There are six different scale modes that control how the content is fitted into the viewport. Although some of them seems to be similar, there might be sometimes significant differences in the result.Â
If the Scale parameter is required, the input field will become active and a proper value must be selected before continuing.Â
Â
Available values:
Mode Name | API Code | Explanation | Resulting Scale on Printout | Scale Parameter Required |
---|---|---|---|---|
Fit Drawing | 0 | Fit entire drawing to given window. | Exact scale will be used that will provide best fit to window. | No |
Match Drawing | 1 | Fit entire drawing to given window. | Closest possible scale from standard scales list will be used. | No |
Fit View | 2 | Fit selected view (spot view) to given window. | Exact scale will be used that will provide best fit to window. | No |
Match View | 3 | Fit selected view (spot view) to given window. | Closest possible scale from standard scales list will be used. | No |
Scale Drawing | 4 | Apply given scale and position the center of drawing in center of window. | Scale according to given value in "scale" parameter. | Yes |
Scale View | 5 | Apply given scale and position center of view in center of window. | Scale according to given value in "scale" parameter. | Yes |
Target Object Settings
This property can only be set for non-master viewports (with ID greater then 1). It allows you to specify a new target (context object) for that viewport in relation to master viewport.
In consists of two main parameters: Perspective set that will be used to find the desired object, and a Target Class that describes what class of objects are we looking for.
In this example, we will be looking for a class Floor according to Perspective Set called "All". If the context object used for printing was a document linked to a Floor, we will look for parent object that matches this condition.Â
Another viewport can be defined in the same way, but with a Target class set as Building.Â
Viewport Highlight
By default, there is one global highlight tool used for all HOPA calls that is also used to highlight spots in print viewports. In addition to this global setting a specific tool can be selected here for selected template and it's viewport.
Select a specific tool, using Tool picker or clear the value to use default highlight tool defined in System Settings. This setting will take effect in all print modes that use this template.
Additional Settings
Additional settings section contains extra parameters that can be used to control the viewport behavior.Â
Document for spot
Describes if for the context object the system should look for a target document linked to that object or if it should follow spot links
Document for spot | links to follow |
---|---|
YES | If the object has a spot (vector element, icon) that is located on any drawing, then use this drawing |
NO | Follow a default link to document for a API perspective (See Hopa settings). If there is no default link, follow a link to first document. |
Â
 It is important to note, that the object will be discovered using provided perspective, but the actual document will be discovered by using HOPA system perspective.Â
As a result, a default document might be different in the perspective used for viewing and the one that is set for HOPA/API navigation.
Spot MarginÂ
Available only for Document for spot mode. Determines how much space should be reserved around object like Room or Apartment.
The image will always fill in the available Viewport with the minimum space reserved. In this case the margin was applied on the horizontal (left/right)
sides and the image was filled in to match viewport vertically (top/bottom).
Â
Mask Mode
Available only for Document for spot mode. Determines if the space outside of spot (element representing an object) is visible.Â
Legends
Each template can contain a single legend window that can be added using Add Legend Window function from the toolbar:
Content of the legend window will be filled in dynamically with legend corresponding to an applied filter in master viewport.Â
Legend window will not expand dynamically, so make sure it is capable of holding a typical legend size.
If the legend content will overflow, information about number of missing elements will be shown on the legend as indicated by the red arrow:
Scale ruler
Rectangle for scale ruler can be added to template choosing Add Scale Ruler button from Viewport toolbar.
Template can have more that one scale ruler if needed. Ruler do not have any parameter but width, that influence how many units will be shown on printout.
Ruler units will be taken from composite drawing and number of values will depend on ruler width.
In some cases units on can be converted to different ones if using them would result in presenting values like 1000 or below 1 - that is rather not excepted result (for example millimetres it will be converted to more readable units like meters if distance on rules goes with thousands millimetres).
All scale rules applies only to Viewport 1.
Scale ruler was implemented for printouts only. As for now, dynamic rulers on print preview is not supported.
Additional Shapes
Additional static template elements like lines, texts or polygons can be added to create a desired look. Use Shapes toolbar to select elements:
Icons
A static Icon can be placed on the template using Insert Icon function. Please note that new icons can be added to the system by using Icons manager (Administration → Icons)
Once added, Icon can be selected from a list:
Macros
Print templates can use macros to display print properties like Scale, Date but also metadata values of document itself and other linked object.
An examples would include:
name or other properties of the document being printed out
name of the floor, building, property
Macros are resolved only against master viewport (ID 1).
A navigation to adjacent objects can be performed based on perspective set and target class, as defined in Macros
To enter macro, use a Text function and ten select Macro checkbox to activate dynamic text:
Multi viewport example
This example will demonstrate how to setup a template that will display
a context document found for Room
floor drawing overview
a building view (facade)
and a document connected to property, containing placement of Building
Let's take a look at configuration of the template and corresponding structure in the system itself.
Object used in this example is a Room. It has it's representation on the document connected to Floor:
This content will be displayed in the main viewport. It does not require any specific settings as this context will be selected by the user before entering Print Preview:
The same drawing but in a full extents view can be shown in a second viewport. We can navigate to Floor class object and display the default document in a Fit Drawing or other modes.
(NOTE: A possibility to display the same contextual drawing as in viewport 1 by default is under development)
Â
The buidling has a document with illustration of a facade connected to it:
We would like to see that drawing in a third viewport. To achieve that, we can select a "Fit Drawing" scale mode,
as well as use All Perspective Set and a proper "struct" (Building) class:
Â
At last, the Bulding also has a vector element (spot) located on a document connected to Property object indicating a building location on a situation plan.
To obtain that view, we will use similar configuration as for Viewport 3, but with Document for spot option set. The difference will be that instead of showing default document for Building,Â
system will follow Building spot, that is located on a document connected to Property object:
Â
The result will look as follows:
The benefit of predefined templates is such that they can be used in Print Preview mode and all viewports will be filled in automatically.Â
Manual change of viewport content during preview is not supported. Only the main viewport can be changed by opening preview on different document.Â
Attachments cannot be used as a part o template - only composite drawings are supported.Â
Print Template Viewport to control displayed document
 Ability to select target class for spot link / document in Print Viewport
Two parameters Document Class and Document Perspective were added to Viewport's Target Object settings in Template Editor
Â
While printing primary document in main viewport, we can add additional viewports that will either contain the same document or navigate to a new target, like Building for example.
The navigation is performed according to chosen Perspective set and Target class in viewport settings:
When this object is found, in this case Building, we will lookup for document:
If Document for Spot option is checked and a spot link exists, it will be used to get document and new parameters will be used only if there are multiply spot links.
If DFS mode is not used (or there is no spot link), document to display is taken based on Document Perspective and Document Class (preferring default links if there are multiply documents for chosen class). Before introducing new parameters, document presented in viewport was chosen based on default HOPA settings in System Settings.
So the new parameters will allow to overwrite default setting for each of templates viewports. If they are left empty, default values from HOPA settings will be used as before.
HOPA usage
HopaGetView4Object parameter DefObjectClassId (DOC) - will overwrite new Document Class parameter from viewport settings therefore it will now support viewport suffix.
new param Perspective set from viewport settings will have a HOPA representation in docperspectivesetid (dpsetid) param.
Order of taking parameters
HOPA params in url: DefObjectClassId and docperspectivesetid.
Viewport's params Document Class and Document Perspective in template.
Default HOPA settings from System Settings.
Â
Â
Â