/
Macros

Macros

Text macros in FM ACCESS are powerful tools that allow you to automatically display dynamic information in your drawings and print templates.

Instead of manually typing and updating text elements, you can use macros to pull information directly from your database, ensuring your documentation stays current and accurate.

These macros can be used in two primary ways:

  • Within print templates to create standardized document layouts with automatically populated fields

  • Directly on drawings as dynamic text elements that update based on linked object properties

The system also provides special template macros for creating editable text fields in print templates, allowing users to input custom text during the printing process. Whether you need to display building numbers, dates, scale information, or user details, FM ACCESS's text macro functionality streamlines the process of managing text elements across your documentation.

In the following sections, we'll explore how to create and implement these various types of macros in your FM ACCESS environment.

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.

    image-20250219-144752.png

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. 


    image-20250219-144942.png



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. 

System Macro "Current User"

Since 4.8

New system macro has been added called Current-User to list of other system macros. It can be added both in print template and on a drawing directly. 

When resolved on a drawing, print-preview or a printout it will display current user Full Name attribute. 

 

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.

Error Handling in Text Macros

When a text macro encounters issues retrieving data, FM ACCESS provides clear indicators to help you identify the problem.

The system uses specific symbols to represent different error conditions:

Error

Indicator

Description

Error

Indicator

Description

Empty Field Indicator

--

When the metadata field referenced by the macro exists but contains no data, FM ACCESS displays two dashes (--).

Deleted Macro Indicator

XX

If a macro that was previously added to a print template has been deleted from the macro list, the system displays "XX".

Unresolved Object Indicator

-

A single dash (-) appears when the macro cannot find the object it's supposed to reference.

Missing Field Indicator

**

In rare cases where the referenced field no longer exists in the system configuration, FM ACCESS displays two asterisks (**).

These indicators help you quickly identify and troubleshoot issues with your text macros, ensuring that your documentation maintains its accuracy and reliability.

Related content

Release notes for version 4.9.0
Release notes for version 4.9.0
Read with this
(no) Release notes for version 4.X.X - TEMPLATE (restricted page) 9
(no) Release notes for version 4.X.X - TEMPLATE (restricted page) 9
More like this