Document toolboxDocument toolbox

(no) Macros



Text macros can be added to print templates or directly in drawings on any vector/redline layer.

Creating macros

  • In Administration panel go to Text Macros panel and click on Add button





  • Type in macro Name

  • Perspective set field

  • Choose Target class from active configuration

  • Choose Target Field of chosen class. This field's value (if it exists) will show on resolved macro

     




  • Click Add button to finish adding macro. Macro will show on the list.

     

Adding macros to Print Templates

  • Go to Templates manager and click on desired Template

  • On Draw toolbar select Add text button and click on template below to point macro into desired place.

  • In Edit Text dialog choose Macro checkbox to enable macro list. 





Macro list will show all macros created in Text Macro panel and system macros like Scale, Data and Time.



In case of print templates consisting from many viewports, macros will be resolved in context of First (main) Vieport only.



Added macro will be shown in Template Editor in unresolved state - visible as macro name in square brackets.

[Macro Name]

 

Macros added to Template Editor will resolve on printouts and in print preview if prepared template is selected.



Print Preview - editable text macros

Users can define editable text place-holders for print templates. This functionality is available as a text macro called "Template".

Values can be filled in at a print preview stage.

Values are not persistent in any way and are only sued in single print session. 

Preparing a Print Template with editable elements

In Template Editor, during defining new text, activate Macro checkbox and choose Template as macro type.
Text content will become displayed as [Template], but in contrast to other macro types, it can be edited.

Enter name of custom macro as desired, thus defining hint advising what content is supposed to be entered manually when using this template for printing.

Using a template with editable texts

During Print Preview, texts from print template defined as "template macros" can be selected for editing.

Click (left or right) onto chosen text element to display short form showing text to be filled-in with a hint displayed as filed label.

Alternatively, click "Fill in" button displayed near Print button to show form with all texts in this specific template that can be filled.

This is a convenient function that allows user to fill in all texts in one place, without the need to click individual elements. 



Adding macros on vector overlay or redline

If user have enough set of rights macro can be added in viewer to selected layer in main HDC panel for selected drawing. It will only exists on this one drawing.
It should resolve (show database data based on it's configuration) only in view/print-preview mode of viewer, and be unresolved in Edit/Redline mode (to be implemented yet).

Those macros are treated in many ways as standard entities - for instance they can be linked to objects. 
So if you add Building Number macro to drawing connected to Floor you can link it to desired Building to display it's properties.

 

After linking building to this macro it will resolve and show building number.



Macros behavior when it does not resolve to data

When macro do not resolve into expected data from object's property than you will see:



  • Metadata field that macro refers is empty:  -- ;

  • Macro does not exists (added to print template and then deleted from macro list): XX ;

  • Macro cannot be resolved - object not found: ;

  • Macro field not exists (very rare): ** .