Where can I find information about Action Strings?

 Version:V8, XM, V8i CONNECT


Where can I find information about Action Strings?


Search on the term "Action strings" in the Help Documentation.

The actions that the product performs when you select a tool, select a menu item, or press a function key are defined by the action string associated with that object. At first it is simplest to think of an action string as a key-in or series of key-ins. For example, the action string associated with the Place SmartLine tool is the key-in PLACE SMARTLINE. The true effect of selecting the Place SmartLine tool is activation of the PLACE SMARTLINE key-in.

Action Types

Several types of actions can be specified in action strings and associated with tools, view controls, menu items, and function keys.

Action typeSyntaxDescription
Command Entry Key-inE,<key-in>Simulates a key-in. The key-in specified by a command entry key-in is always activated, regardless of state of the active key-in. For example, suppose that PLACE CIRCLE RADIUS is the active key-in and is prompting for the radius. If you press a function key defined in the function key menu to have action type E that activates the PLACE LINE CONSTRAINED key-in, then PLACE LINE CONSTRAINED becomes the active key-in.
Terminated Key-inT,<key-in>Simulates a key-in. A terminated key-in is normally used to get data requested by prompts, such as the radius of a circle, text, or an answer to a yes-or-no question.
Unterminated Key-inK,<key-in>Keys in an unterminated string of characters and waits for you to finish the string.
Print MessageM,<message>Prints a message in one of the status bar fields.

Action Type Options

These options can be used immediately following the E, T, or K action types or anywhere in a multiple action string following a semicolon.

/<character>If there is a slash (/) in an action string, the product pauses for user input. If the slash is followed by d, k, or no character, the product does the following:
  • /d — waits for a data point.
  • /k — waits for a key-in.
  • No character — proceeds after any input.
%<character>A percent (%) character in an action string is identical to the slash, except that the product does not display any of its normal prompts. This is useful to display custom prompts from a menu. The actions %d and %k work analogously to /d and /k.

Entering Multiple Action Strings

Each action string can contain several actions (separated by semicolons).

For example, this action string places a blue two-inch circle at a user-specified point: co=blue;E,PLACE CIRCLE RADIUS;T,2;M,cfPlace 2 Inch Circle;%d;null

The actions are as follows:

co=blueA command entry key-in (since no type is specified) that sets the Active Color to blue. The product activates the ACTIVE COLOR key-in even if it currently expects a data key-in.
T,2A terminated key-in that enters a radius of 2.
M,cfPlace 2 Inch CircleDisplays the message "Place 2 Inch Circle" in the status bar.
%dWaits for a data point without displaying the normal prompts (preserving the prompt displayed by the previous action).
nullAfter the circle is placed, executes the NULL key-in so that no tool or view control is selected.

See Also

Other language sources


 Original Author:Robert DiMauro