Generating Macro-Style Output
- Last UpdatedNov 14, 2025
- 3 minute read
Keywords:
REPORT MACRO
Description:
The command for specifying macro-style output from Design’s Clash Detection mode is an extension of the REPORT command options described in Reporting the Clashes Found.
The REPORT MACRO command must be followed by the name of a valid template file. If the named file cannot be read by Design, or if there is an error in the formatting of its keyword content, then the MACRO option is ignored and subsequent reports will be output in the standard way.
To generate a macro file, having first given a valid REPORT MACRO template_file command, use the ALPHA FILE syntax to direct your output to the required macro file name. Then output your clash report in any of the usual ways (that is, by using a CHECK, BOXCHECK, CHECKADD or, more probably, OUTPUT command).
When a report is output in macro mode, the following conditions apply:
-
The header and summary are not output, so that only the main body data is merged with the template file
-
Section identifiers are not output
-
The REF and NUMBER options, if in force, are included in the $CLATEXT$ locations
-
The BOTH/FIRST/SECOND and PRIMARY options, if in force, are taken into account when working out which clashes to output
Examples:
This example illustrates how you might create an Draft input macro for plotting clashing items identified by Design. It assumes some understanding of the use of Draft, although you need not understand the purpose of all of the Draft commands in order to follow the basic principles.
A template file containing the necessary commands for Draft to display and plot four views of clashing items might be as follows:
$( $CLANUM$: $CLATEXT$ $)
$( NEW DEPT /DEPT-1
NEW REGI /REGI-1
NEW DRWG /DRWG-1
NEW LIBY /LIBY-1
NEW DLLB /DLLB-1
NEW RPLB /RPLB-1
NEW STYL /STYL-1
TU ON CL OFF
DLEV6
NEW RRST /RRST-1
NEW RRUL /RRUL-1
USE /STYL-1 FOR ALL
$)
/DLLB-1
NEW IDLI /IDLI-$CLANUM$
ADD $CLAOWN1$ $CLAOWN2$
/DRWG-1
NEW SHEE /CLASH-SHEET1-$CLANUM$
SIZE A4
NEW VIEW /VIEW1-$CLANUM$
VREG XR 0.46 YR TO XR 0.9 YR 1
IDLN /IDLI-$CLANUM$
VTYPE UNIV
RRSF /RRST-1
VSCA 1/40
THPOS $CLAPOS$
DIR N
NEW VIEW /VIEW2-$CLANUM$
VREF XR 0 YR 0.1 TO XR 0.44 YR 0.55
IDLN /IDLI-$CLANUM$
VTYPE UNIV
RRSF /RRST-1
VSCA 1/40
THPOS $CLAPOS$
DIR E 0.01 D
NEW VIEW /VIEW3-$CLANUM$
VREG XR 0.46 YR 0.1 TO XR 0.9 YR 0.5
IDLN /IDLI-$CLANUM$
VTYPE UNIV
RRSF /RRST-1
VSCA 1/40
THPOS $CLAPOS$
LOOK D
NEW VIEW /VIEW4-$CLANUM$
VREG XR 0 YR 0.6 TO XR 0.44 YR 1
IDLN /IDLI-$CLANUM$
VTYPE UNIV
RRSF /RRST-1
VSCA 1/40
THPOS $CLAPOS$
ISO 3
SHEE
NEW NOTE
NEW TEXP
AT X137 Y32
ALIGN HB JUST C CHEI 4 FONT 1
BTEX ’$CLANUM$: $CLATEXT$’
SHEE
UPDATE DESI
PLOT SHEE FILE /$CLASHPLOT$CLANUM$
$(---------------------------------------------------$)
You could name this template file /Draft.TEM and then merge existing clash data with it to create an /Draft macro input file /Draft.MAC, thus:
|
REPORT MACRO / DRAFT.TEM |
specifies macro mode and template file |
|
ALPHA FILE / DRAFT.MAC |
specifies merged output file (the macro) |
|
$P ’$ |
( DRAFT macro created using DRAFT.TEM $)’ |
|
$P ’’ |
leaves blank line after header |
|
OUTPUT |
outputs all current clash data to macro |
|
$P ’$.’ |
adds macro end marker $. |
|
APLHA FILE END |
closes output file |
|
REPORT MACRO OFF |
reverts to normal output |
The resulting macro /Draft.MAC will comprise multiple copies of the Draft commands with the appropriate data substitutions for each clash output.
If you run this macro, the specified four views will be plotted for each pair of clashing items diagnosed and output by Design. Each set of views will be sent to a plotfile named /CLASHPLOTn, where n is the clash number allocated by Design.
Command Syntax:
>--- REPort --- MACro ---+--- template_filename ---.
| |
‘--- OFF -----------------+--->
Querying:
Q CLASH REPort MACro
Gives name of template file (or OFF)