Action Macro Example: Insert a Block and Change a Dynamic Property Value

In this example, you learn how to insert a dynamic block from a tool palette and change its dynamic properties using the Properties palette.

In this example, you learn how to

Start Recording an Action Macro

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

Record Actions from the Tool Palettes Window

Once recording is started, you can record the actions performed by tools on tool palettes and property changes made with the Properties palette. From the Tool Palettes window, you will place the I Beam - Imperial dynamic block from the Structural tool palette and change one of the block's dynamic properties with the Properties palette. Follow these steps:

  1. At the Command prompt, enter toolpalettes to display the Tool Palettes window.
  2. At the Command prompt, enter properties to display the Properties palette.
  3. In the Tool Palettes window, under the All Palettes group, click the Structural tab.
  4. On the Structural tab, click the I Beam - Imperial tool.
  5. On the Properties palette, under the Custom category, click the Beam Sizes field.
  6. On the Beam Sizes drop-down list, select IPE A 140.
  7. In the drawing area, specify the insertion point for the block.

Stop Recording and Save an Action Macro

After all the actions have been recorded, you 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 InsertIPEA140.
    • In the Description box, enter Inserts an IPE A 140 beam.
  3. Click OK.

Remove an Action

When you record an action macro, additional actions are sometimes recorded that you do not want to occur when you play back the action macro. For example, while recording this example you displayed the Tool Palettes window and Properties palette. These actions are not needed to play back the action macro. To remove an action, follow these steps:

  1. On the Manage tab, expand the Action Recorder panel.
  2. In the Action Tree, select the TOOLPALETTES action node under the Action Macro node and right-click. Click Delete.
  3. Select the PROPERTIES action node and right-click. Click Delete.

Prompt for Insertion Point

The coordinate values used when recording an action macro are the same values used when the action macro is played back, unless you insert a base point into the action macro or insert a pause for user input. To prompt for a coordinate value, follow these steps:

  1. On the Manage tab, expand the Action Recorder panel.
  2. In the Action Tree, right-click the coordinate value under the EXECUTETOOL action node. Click Pause for User Input.

Play Back the Action Macro

When you play back the action macro, you are prompted to specify the insertion point of the block. To see the results of the action macro, follow these steps:

  1. Click Manage tab Action Recorder panel, in the Action Macro list, choose InsertIPEA140.
  2. Click Play.
  3. When prompted to specify a base point, click a base point in the drawing area to insert the block.

    As the block is inserted, the beam size selected from the Properties palette is used.

  4. In the Action Macro - Playback Complete dialog box, click OK.