macro write

Write the commands that are to be executed (defined by the commands_to_be_executed parameter) from the macro to a file. The file will contain comments at the top about the macro definition and the commands to be executed.

Format:

 
macro write
macro_name =
macro name
file_name =
file name with path

Example:

 
macro write &
macro_name =
ANALYSIS_DELETE

Case:

macro create &
  macro_name=ANALYSIS_DELETE &
  user_entered_command="delete analysis" &
  help_string="Quickly delete an analysis" &
  commands_to_be_executed ="model delete analysis_name=$analysis_name"
 
 
macro write macro_name=ANALYSIS_DELETE
 
would generate the file ANALYSIS_DELETE.cmd, which contains:
! USER_ENTED_COMMAND ANALYSIS_DELETE
! WRAP_IN_UNDO YES
! HELP_STRING Quickly delete an analysis
model delete analysis_name=$analysis_name
 

Description:

 
Parameters
Value Type
Description
macro_name
String
Specifies the name of the existing macro whose commands will be written to a file
file_name
String
Specifies the name of the file that is to be read, written, or executed.

Extended Definition:

1. You may identify a macro by typing its name. If a macro is available by default, you may identify it by entering its name only. If it is not, you must enter its full name. If you type a "?", Adams View will list the macros available by default. You must separate multiple macro names by commas.
2. You do not need to enclose the file name in quotes if it only contains alpha-numeric characters and starts with a letter. If you want to include other characters, such as a '.' for an extension or '/' or '[ ]' for directory paths, you must enclose the name in quotes.

Tip:

1. You can read the macro back into Adams View with the macro read command. The default extension for this file is '.cmd'.