Arbortext IsoDraw > Macro Language Reference > Introduction > About Macros > Macro File Structure
  
Macro File Structure
Macros are stored in ASCII text macro (*.ism) files. A macro file must contain at least one macro, and can contain more as shown in the example below.
The macro file Example.ism listed below contains two macros named Example1 and Example2.
* 
Comment lines in a macro file begin with a hash (#) mark and are not executed.

#Listing of macro file Example.ism:
#
#The macro Example1 performs 3D mode view-setting commands
MACRO Example1
3D VIEW DIMETRIC_2
3D HLRMODE WIREFRAME
3D SETVIEW 903
END MACRO
#
#The macro Example2 prompts for a custom Pen name
#and checks to see if the name exists
MACRO Example2
DEFINE penName AS String
penName = Get String "Name of your new Pen?"
IF (exists (activeDoc.Pens[penName]) = false) THEN
Add Pen penName
ELSE
MESSAGE "Pen " + penName + " already exists!"
END IF
END MACRO