Commands

BACTIONSET command in AutoCAD : Specifies the selection set of objects associated with an action in a dynamic block definition

If you need a clear, beginner-friendly guide to using the BACTIONSET command in AutoCAD—what it does, how to use it step by step, why it may fail and how to fix it—this article covers it all, with practical examples, alternatives, troubleshooting and useful tips for working with dynamic blocks.


What is the BACTIONSET command?

BACTIONSET is an AutoCAD command used inside the Block Editor to define or change the selection set of objects that are affected by an action in a dynamic block definition. In plain terms: when a block has a parameter (for example, a linear or rotation parameter) and an associated action (such as Stretch, Move, Rotate or Scale), BACTIONSET tells AutoCAD exactly which geometry in the block should respond when that action runs.

Key points:

  • Works inside the Block Editor (BEDIT).
  • Targets the selection set for an existing action.
  • Commonly used with Stretch (Linear) actions, Rotate, Scale, and Move actions within dynamic blocks.

When and why you use BACTIONSET

Use BACTIONSET when you want to:

  • Add or change the objects that an action controls after the action has been created.
  • Correct a selection set that misses elements or includes unwanted objects.
  • Fine-tune how a dynamic block behaves when parameters are changed.

Example scenarios:

  • You created a Linear parameter + Stretch action but some lines inside the block don’t stretch — use BACTIONSET to include them.
  • You need different geometry to rotate when the block’s rotation parameter is used — update the action’s selection set with BACTIONSET.

Step-by-step: how to use BACTIONSET

  1. Open the block in the Block Editor:

    • Type BEDIT (or right-click a block and choose Block Editor) and open the block definition you want to edit.
  2. Select the action you want to modify:

    • In the Block Editor, in the Parameters & Actions area, click the action node (for example a Stretch or Rotate action) to make it the current action.
  3. Start the BACTIONSET command:

    • Type BACTIONSET at the command line and press Enter.
    • AutoCAD prompts: select the action if you did not pre-select one.
  4. Select the objects for the action:

    • Use standard selection methods (click, window, crossing, or selection filters) to pick the geometry inside the block that should be affected.
    • Press Enter when selection is complete.
  5. Verify the selection:

    • The command updates the action’s selection set. You can see the affected objects highlighted or check by running a test.
  6. Save and test the block:

    • Click Save Block (or type BCLOSE and save changes).
    • Insert or update the block in model space and test the parameter(s) to ensure the desired geometry responds correctly.

Shortcut/notes:

  • There is no special alias beyond typing BACTIONSET. Use the command line for precise control.
  • Always edit selection sets while inside the Block Editor—BACTIONSET will not work from model space.

Practical examples

Example A — Fixing a Stretch action:

  • Problem: A door block’s Stretch action moves some lines but leaves the door frame unchanged.
  • Solution: Open the block with BEDIT, select the Stretch action, run BACTIONSET, select the missing frame lines, save the block. Now the whole frame stretches when the parameter changes.

Example B — Changing Rotate targets:

  • Problem: A symbol has a Rotate action but only the hub rotates, not the attached arrows.
  • Solution: In Block Editor, pick the Rotate action, run BACTIONSET, add the arrow objects to the selection set, save and test.

Alternatives to BACTIONSET

  • Edit the action directly in the Block Editor: sometimes removing and re-creating the action with correct selection can be faster.
  • Use BEDIT + the Parameters Manager (in some AutoCAD versions) to inspect action properties and selection sets.
  • Rebuild the block: if selection logic is complex, explode and re-create the block geometry and action to ensure clean associations.
  • Use selection tools (e.g., Quick Select or FILTER) inside the Block Editor to create precise selection sets before running BACTIONSET.

Common reasons BACTIONSET doesn’t work and how to fix them

  1. You are not in the Block Editor

    • Symptom: Command returns “No current block” or selection is ignored.
    • Fix: Open the block with BEDIT and run BACTIONSET from inside the Block Editor.
  2. Objects are not part of the block definition

    • Symptom: Objects can’t be selected or changes don’t persist.
    • Fix: Make sure the geometry is inside the block definition. If geometry is an external reference (XREF) or separate drawing objects, include them in the block or recreate them inside the block.
  3. Layer or object lock/visibility prevents selection

    • Symptom: Objects don’t highlight or can’t be selected.
    • Fix: Turn on and thaw layers, unlock objects, ensure they’re not on a frozen or off layer.
  4. Selection set includes unsupported entities

    • Symptom: Some entity types are ignored by the action (e.g., annotation vs. geometry).
    • Fix: Check action type requirements — some actions only support certain object types (lines, polylines, solids). Convert objects if needed.
  5. Nested blocks or dynamic block references

    • Symptom: Objects inside nested blocks don’t get picked.
    • Fix: Explode or edit the nested block, or edit the nested block definition separately and set actions where appropriate.
  6. The action type is incompatible with intended operation

    • Symptom: After setting the selection set, the action still does not produce the expected result.
    • Fix: Verify you used the correct action for your goal (e.g., use Stretch for resizing along an axis, Rotate for rotation, Scale for proportional changes).
  7. Command aborted by selection filters or system variables

    • Symptom: Selection behaves unexpectedly.
    • Fix: Ensure PICKFIRST and other selection-related system variables are set normally; clear active selection filters or running commands that intercept selection.

Tips and best practices

  • Always test dynamic block behavior after edits by using Block Editor Test Block or inserting/updating the block in model space.
  • Use precise selection: Prefer window/crossing selection combined with SHIFT to add/remove items for reliable sets.
  • Keep geometry simple and grouped logically so actions target predictable objects.
  • Name parameters and add descriptive action tags or notes in the block editor to make future edits easier.
  • Version control: Save a copy of the original block before major changes so you can revert if needed.
  • Use the Properties palette inside Block Editor to check and verify parameters and action associations.

FAQ

Can I run BACTIONSET from model space or without opening the Block Editor?

No. BACTIONSET must be used inside the Block Editor (BEDIT). It modifies the block definition, which cannot be changed from regular model space editing.

How do I remove objects from an action’s selection set?

Open the block with BEDIT, run BACTIONSET, reselect the action, then select only the objects you want to remain in the set (or clear and rebuild the set). Another approach is to delete and recreate the action with the correct selection.

My selection set won’t include nested block geometry — what should I do?

Edit the nested block definition separately in the Block Editor and set its actions there, or explode/flatten the nested geometry into the parent block and then use BACTIONSET. Be careful: exploding may change geometry behavior.

Is there a way to script or automate BACTIONSET for many blocks?

Direct automation of BACTIONSET is limited because it interacts with block definitions and interactive selection. You can use AutoLISP, .NET, or ObjectARX to programmatically modify block definitions and selection sets, but that requires development skills and careful testing.

After changing the selection set nothing happens — how can I debug this?

Check these items: ensure the action type matches what you want (Stretch vs Rotate), verify affected objects are supported by that action type, check for locked/frozen layers, and test the parameter in the Block Editor preview or after saving and inserting the block.

Will BACTIONSET affect existing inserted blocks in the drawing?

Yes. Changing the block definition updates all instances of that block in the drawing (unless you choose to keep some references as separate). Save and reload/update the block to propagate the change.