#### $#Advanced Macro File Tips

See Also: Automatic Macro File Generation

Macro files are used in conjunction with importing aperture files. CAMCAD is shipped with several different macro files, and RSI has more macro files available on the World Wide Web site.

Customization of macro files is sometimes necessary in order to successfully import an aperture file. When you open a macro file in a text editor, you will see the following relevant terms:

** Lines that begin with a period (.) are macro file commands

** Lines that begin with a semicolon (;) are commented out

** .ASSIGN = Older aperture files may not have D-Codes defined within the aperture file, but rather may have only an aperture number. The .ASSIGN command assigns D-Codes to aperture numbers. Depending on the aperture file, these lines may or may not be necessary. If they are not necessary, they can still be present within the macro file and will not influence the success of the macro file. Should you need to enter more apertures, follow the same pattern as the other .ASSIGN lines.

** .STARTDEF = The beginning of the macro file definition

** .UNITS = Units - INCH, MIL, MM

** .TEXTDELIMITER = Should you wish to skip an entire text section of a line in the macro file, you can designate .TEXTDELIMITERS. Common delimiters are parenthesis (), single quotes, '' and double quotes. ""

** .IGNORE = Any character appearing in the .IGNORE quotes are ignored by the .SCANLINE command. Note - when a character is .IGNORED, it is ignored throughout the ENTIRE aperture file.

** .WORDDELIMITER = Any character appearing in the .WORDDELIMITER quotes will act as a separator between words. Note - when a character is a delimiter, it is a delimiter throughout the entire aperture file. The delimiter is case sensitive. A blank space must always be present in the .WORDDELIMITER line.

** .FORM_xxx = The CAMCAD command for that aperture shape. .FORM_ROUND, .FORM_SQUARE, .FORM_RECT, .FORM_THERM are the most common shapes. The .FORM_xxx command is always followed by a space and the aperture file name for the same aperture shape.

** .SCANLINE = The macro file command to scan the aperture file line by line. This command is always followed by a series of other commands that match the sequence of data in the aperture file. When the Aperture Smart Reader scans the aperture list, it will scan a line and then compare it to the .SCANLINE command definitions found in each of the .STARTDEFs until it finds a match between the commands in the .SCANLINE and the information in the aperture list. The .SCANLINE acts as a template.

** .SKIPWORD = Issued in the .SCANLINE command, the .SKIPWORD command will ignore the corresponding word in the aperture file line.

** For further references to the macro file commands, please open the file default.mac in any text editor and review the contents.