Action Macro Example: Modify Circles With the Properties Palette

This example shows how to apply an object selection filter when selecting objects and then change the color property of the selected objects.

In this example, you learn how to

Note: Before you start the exercise, add some circles to your drawing or open a drawing that already contains some circles.

Start Recording an Action Macro

You start recording actions on the Action Recorder panel. To display the Action Recorder panel and to start recording, perform this step:

Modify Objects Using the Properties Palette and Object Selection Filter

Once recording is started, you can select objects and then modify their properties with the Properties palette. Follow these steps:

  1. At the Command prompt, enter properties to display the Properties palette.
  2. Select the objects in the drawing that you want to modify.
  3. On the Properties palette, in the Objects drop-down list, select Circles.
  4. Under the General category, select the Color field.
  5. In the Color drop-down list, select Blue.

Stop Recording and Save an Action Macro

After all the actions have been recorded, stop recording and save the recorded actions to an action macro file. Follow these steps:

  1. Click Manage tab Action Recorder panel Stop.
  2. In the Action Macro dialog box, do the following
    • In the Action Macro Command Name box, enter BlueCircles.
    • In the Description box, enter Changes the color of all selected circles to blue.
  3. Click OK.

Change the Selection Set to Use the Pick First Selection Set

With a request for user input, you can prompt for a new value when playing back an action macro. In this example, you change the selection set created to use the Pick First selection or prompt for a selection set when the action macro is played back. Follow these steps:

  1. On the Manage tab, expand the Action Recorder panel.
  2. In the Action Tree, select the Pickfirst value node and right-click. Click Use Pick First Set.

Play Back the Action Macro

When you play back the action macro, you are prompted to select objects if no objects are selected. To see the results of the action macro, follow these steps:

  1. Draw some circles and other objects in the drawing. Change the colors of the objects to colors other than blue.
  2. Click Manage tab Action Recorder panel, in the Action Macro list, select BlueCircles.
  3. Click Play.
  4. In the Action Macro - No Objects Selected dialog box, click Select Objects and Continue.
  5. When prompted to select objects, select the circles and the other objects in the drawing. Press Enter to complete object selection.

    The circles in the selection set are changed to the color blue.

  6. If the Action Macro - Playback Complete dialog box is displayed, click OK.

Undo the changes made by the action macro by clicking Undo from the Quick Access toolbar. Now select some objects in the drawing and playback the BlueCircles action macro. This time the action macro uses the Pick First selection and you are not prompted to select the objects in the drawing when the action macro is played back.