macro modify
A macro is a single command that you create to execute a series of Adams View commands. The macro modify command allows edition of existing macros.
Format:
macro modify |
|---|
macro_name = | macro name |
new_macro_name = | modified macro name |
user_entered_command = | command representing the macro |
commands_to_be_executed = | list of commands to be executed |
wrap_in_undo = | yes/no |
help_file = | help file path |
help_string = | help text |
create_panel = | yes/no |
security_code = | alpha-numeric code to run a macro |
Example:
macro modify&
macro_name = .TEST_MACRO &
new_macro_name = .TEST_MACRO_1 &
user_entered_command = "TESTMAC" &
commands_to_be_executed = &
"!$parts:T=part:C=0", &
"!$analysis:T=analysis:D=Last_Run", &
"!END_OF_PARAMETERS", &
"!", &
"!---set the default analysis", &
"defaults analysis analysis_name = $analysis", &
"",&
"!---loop through part list", &
"for var=the_part obj=$parts", &
" defaults model part_name=(the_part)", &
" file spread_sheet write &", &
" file_name = (DB_DEFAULT(SYSTEM_DEFAULTS,\"PART\").name) &", &
" result_set_name = ((DB_DEFAULT(SYSTEM_DEFAULTS,\"PART\").name)//\"_XFORM\")", &
"end", &
"", &
"!---clean-up", &
"variable delete variable_name=(eval(db_children($_self,\"variable\")))" &
!
wrap_in_undo = No &
help_string = "This test macro can export part XFORM results." &
create_panel = No
!
Description:
Parameter | Value Type | Description |
|---|
macro_name | String | Specifies the name of the macro to be modified |
new_macro_name | String | Specifies the name of the new macro |
user_entered_command | String | Specifies the command string to be entered by the user to execute the macro. |
commands_to_be_ executed | String | Specifies the list of Adams View commands to be executed. |
wrap_in_undo | Yes/No | Specifies whether or not to the entire macro can be undone with a single undo command. |
help_file | String | Specifies the text that is to be used as the command or topic string when getting help on a macro. |
help_string | String | Specifies the text that is to be used as the command or topic string when getting help on a macro. |
create_panel | Yes/No | Allows the user to specify if a panel is to be created for the specified macro. |
security_code | |
Extended Definition:
1. Adams View will not allow you to have two macros with the same full name, so you must provide a unique name. You must separate multiple macro names by commas.
2. You may use this name later to refer to this macro. Adams View will not allow you to have two macros with the same full name, so you must provide a unique name. Normally, entity names are composed of alphabetic, numeric, or '_' (underscore) characters, and start with an alphabetic or '_' character. They may be any length. By enclosing the name in double quotes, you may use other printable characters, or start the name with a numeral. If a name contains characters, or starts with a numeral, you must always quote the name when entering it. Note that you can specify the parentage of an entity (e.g. what part "owns" a marker or a geometry element) when you CREATE it by changing the name. If you enter just the entity name, then the default parent will be assigned by Adams View. If you type in the full name, then you may over ride the default parent. In most cases, when creating an entity, Adams View will provide a default name. The default name that Adams View provides will specify the parentage that it has assumed. You may, of course, delete this name and use your own. The form of a full name is: "...._NAME.GRAND_PARENT_NAME.PARENT_NAME.ENTITY_NAME" The number of levels used varies from case to case and the parentage must exist before an entity can be assigned to it.
3. The user entered command is a string is a list of keywords separated by blanks. The keywords can match existing keywords, but the final command defined must be unique. For example: user_entered_command = "force my_force create" If this parameter is not entered, the name of the macro will become the new command.
4. You can specify the Adams View commands that are to be executed when the macro is used with the COMMANDS_TO_BE_EXECUTED parameter on the MACRO READ and MACRO MODIFY commands, or from a file on the MACRO READ command. Adams View does not check your entries in this field for correct syntax when you create the macro, only when the macro is executed. You enter these commands as quoted strings separated by commas. You can have quotes inside a string by proceeding them with a backslash "\". You can indicate parameters to associate with the macro be placing a dollar sign '$' followed by the name of the parameter you want anywhere in the commands (see MACRO).
5. The help that is obtained by this string is the same as you would get if you supplied the help string to the command: help command_or_topic=. You must specify the entire file name, there is no default extension. The search path facility is used to find the specified file.
6. If there are not parameters in the macro, no panel will be created. The name of the macro panel will be 'macro_' appended with the macro name. For example, if the name of macro being created or modified is MAC1, the panel will be named 'macro_MAC1'.
Tips:
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.