Dynamic Block Tutorial #4: Adding More Actions

 Dynamic Block Tutorial #4: Adding More Actions Previously, we have created a door. We add some actions so this door can be resized to an available width in our list. But it’s not perfect yet. At least not for our purpose. Now we are going to add more actions so this door can be flipped, and will align automatically to our wall orientation.

Open your file that contain the door block we have created on previous tutorial. Open that block in block editor. We are going to add two flip actions. Let’s just use parameter sets. Parameter sets basically just the same with placing parameters and actions. Only it place them both right away. Sometimes this is harder to control. But flip action is quite simple,  so I think this will be safe :) In block authoring palette, open parameter set tab. Activate flip set.

flip set

We are going to add one flip action first. Click first and second point at mid point of our door frame as below. This will allow our door to be flipped vertically.

flip action

When we placed the flip action set, the only thing we define is the reflection line. Look at the action button, we have a warning sign on it. It means we haven’t give all the data it’s required. We haven’t define which objects will be affected by this action.

flip action

Click on the flip action button, right click. Select action selection set>new selection set from context menu.

add objects to action

When AutoCAD ask you for objects, type ALL [enter]. Do not try to select objects, just type ‘all’ to select all objects. I’ve tried to select by crossed window, and my dynamic block didn’t work as expected. I suspect that there are some objects are not selected. It shows different numbers on how many objects selected.

Try to test your dynamic block, and see if it works fine. Now let’s move on, we are going to add another flip action. Add it so we can flip our door horizontally.

flip state 2

Just like before, add all objects to be flipped. Test it. You will see that our insertion point is shifted. There is no way to eliminate this error by using parameters and action only. At least there’s no way that I know. Even in door sample from Autodesk, they can’t keep the insertion point at it’s place. We can use dimension and geometric constraints in AutoCAD 2010 (or newer), but not with parameter and actions. I will write about parametric constraints later, after we finish our plan.

shifted insertion point

However, we can minimize this impact. I hate to move my door after I placed it. So I add one more stretch action to our linear parameter. I add the stretch frame outside the flip parameter. I want this parameter also stretched when my door is resized.

stretched object

I also change the distance multiplier to 0.5. Changing this value will keep my flip action at midpoint of my door width. (Door width changes)/2.

distance multiplier

Save it, and test it. When we stretch it first, then flip it horizontally, then the insertion point will remain at it’s position. But if we stretch it at this position, then the insertion point will be shifted. At least this is better.

The last parameter we will add is alignment. Alignment don’t need action. We just add this parameter, and it will work.

 Dynamic Block Tutorial #4: Adding More Actions

This is our finished door.

finished door

Save it, close block editor. Try to place some wall, vertical, horizontal, and angled wall. Try our door to these walls :)

I hope you like this trick.

Share this Post!


Rate This Post

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

About the Author

Application Engineer. Jakarta, Indonesia. 5+ years experience as CAD engineering application. AutoCAD, MicroStation, Inventor, Autodesk Revit Architecture 2010 certified professional, and certified CATIA part design specialist. Here are some topics I am currently focusing on

You might also interested to these posts:

  1. Dynamic Block Tutorial #3: Door
    This is the last object we are going to create using dynamic block. We are going to create a door. Basically it’s not that different with what we did before....
  2. Dynamic Block Tutorial #1: Creating Wall
    How long does it take to draw a simple floor plan with AutoCAD? Let’s say a typical rent office plan, not much walls to be drawn, plenty of open spaces....
  3. Dynamic Block Tutorial #2: Creating Column
    Let’s continue our dynamic block tutorial. We have created a basic dynamic block tutorial by adding one stretch action to our wall block. We will discuss further about parameter properties...