new photo blog

i started this blog in 2006, and it's shifted along with my interests through the years. it's been witness to a lot of learning for me...

still, i feel that i need a home for my photography -- so from now on, i'll be posting my pictures on the journal on my reworked website. if you like my photos, you might decide to follow me there!

my first post is here -- check it out!

as for this blog, i'm not sure what will happen. i don't think i'm willing to let it go, and certainly i'll keep it as an archive, but i need some time to figure it out.

for those of you that pop in from time to time, thanks for the visits and encouragement.

Friday, July 09, 2010

autoCAD: dynamic door block

i almost never blog about autoCAD, much less an obscure problem few people hit, but i've seen people asking about this on forums so i thought i'd write up a solution. if you use autoCAD and are interested in dynamic blocks, read on. if not, never mind :-]

the problem: how to create a door symbol that stretches dynamically and flips horizontally and vertically. for some users, the flipping action screws up the size of the door panel, so it doesn't behave as expected. here's a step-by-step tutorial for creating the symbol, with a special note on the detail that's the problem:

1. draw a door symbol to preference. for brevity, mine is as simple as it gets:

2. create the block and load it into the block editor.

first, you're going to make the door stretch-able. you have to handle the door panel and the arc separately:

3. add a linear parameter by hitting two points from left to the right. select the parameter, right click and hit grip display > 1. it should look like this:

4. add a stretch action by selecting the linear parameter, hitting the red node on the right blue arrow grip, drawing a frame around the top of the door panel, and then selecting the door panel ONLY... and NOT the arc.

5. select the stretch action, go to properties, find the angle offset property item under overrides, and enter 90. ( this will make the panel stretch vertically while you're stretching horizontally with your mouse.)

6. add a scale action by selecting the linear parameter and then the arc. (this will change the size of the arc without distorting its shape.)

at this point, your work should look like this...

this includes the linear parameter and the two action icons for stretch and scale (in the bottom right corner).

so far, so good, time to flip horizontally...

7. add a flip parameter to the center line of the symbol.

8. add a flip action by selecting the parameter and then, at the select objects prompt, enter ALL.

this bit is the main problem. do NOT select objects with your mouse: make sure you type ALL. if you try both methods, you'll notice that, with ALL, you select two objects more than you do with your mouse.

i assume that the crucial difference is the two points that determine the stretch frame, which are not visible, therefore unselect-able with the mouse.

now we need to make sure that the flip arrow always stays in position on the symbol's centerline as you stretch. here's how:

9. add a move action for the flip arrow. select the linear parameter, then hit its right red arrow node, and finally select the flip parameter.

10. select the new move action icon, hit preferences, and enter 0.5 for the distance multiplier under overrides.

finally, we have to make the door flip vertically...

11. add a second flip parameter as shown in the image below.

12. add the flip action for the new flip parameter and enter ALL in order to select all objects. it should look like this:

you're going to make sure the first arrow also flips the new one:

13. select the first flip action, right click, hit action selection set > modify selection set, and at the select objects prompt, select the second flip arrow parameter. this will add the second flip arrow to the original, horizontal flipping action.

14. add a baspoint parameter to your 0,0 coordinates (the block's insertion point). this will prevent your door symbol from moving around in the wall opening as it's being flipped all over the place.

again, we're going to want the basepoint parameter to flip along horizontally with everything else:

15. hit the first flip action, right click, hit action selection set > modify selection set, and at the select objects prompt, select the basepoint parameter.

i didn't get into the issue of listing standard sizes for your door via the linear parameter -- but you already know how to do that, right?

try it!

let me know if it works -- or not -- or if i've mucked up the description somehow. i'll gladly edit.

©2010 toomanytribbles


  1. thank you soo much it works perfect...................

  2. hello... i am kind of stuck at the state modify selection set for the flip action. some how it ask me for enter base point or displacement...instead of object .... can you help?

  3. Anonymous16/7/13 02:55

    That 'ALL' selection method is what was killing me, thank you!