Using Macros in CAD Blocks - Intergraph Smart Instrumentation - Help

Intergraph Smart Instrumentation Help

Language
English
Product
Intergraph Smart Instrumentation
Search by Category
Help
Smart Instrumentation Version
13.1

A macro enables you to perform a number of automated actions in a predefined order. When using a CAD application, macros are used to retrieve data from the database to a predefined location on the drawing layer. The macros are assigned per block and the text that they retrieve is eventually displayed as part of the block.

You can assign one or more macros to each block. Some macros are used for retrieving data for instruments with the same function. For example, flow transmitters, flow elements, and I/P transducers have a common function. Therefore the same macros are used to retrieve the data for each of these instruments. The macros required for each of these instruments are the tag prefix (TAG_PRFX), instrument type (FUNC_ID), tag number (TAG_NUMC), and tag suffix TAG_SUFF).

The diagrams below display a loop drawing that was generated along with its related macros. This example illustrates how the same macros can be used to extract the same or different data for different tag numbers – the Tag Prefix and Tag Number are identical for each of the three instruments. However, the instrument type is different, although represented by the same macro.

For the instruments in this example, the tag suffix was not used.

Loop Drawing with Macros

Generated Loop Drawing

PPM All Outputs Graphic

PPM All Outputs Graphic

If you have used the standard drawing blocks supplied with Smart Instrumentation, or if you created your own drawing blocks with the predefined macros, Smart Instrumentation recognizes these macros when generating the loop drawings, and you do not need to make any modifications to them. However, you may want to modify macros in the following circumstances:

  • If your drawings include macro names other than the predefined ones, you can customize the default macro definitions as required. For details, see Customizing Macro Definitions.

  • If you want to modify certain display formatting of the macros, you can specify user- defined macro functions. For details, see Working with User-Defined Macro Functions.

  • If you want to use an external data source other than the Smart Instrumentation database for displaying information defined by a macro, you can connect to the appropriate database and use the macros defined in that database. For details, see Using External Macro Data Sources.

Macros in a CAD application, that you want to solve with a general signal in Smart Instrumentation, must have the general signal name (as defined in the Smart Instrumentation Local Signal dialog box) added as a prefix to the CAD application macro. For example, for the CAD macro PNL_NAME.1.4, to be recognized by Smart Instrumentation and solved with the general signal called GENERALIST1, you add the general signal name to the CAD macro as a prefix in the CAD application: GENERALIST1.PNL_NAME.1.4.