Wouldn't that be a scaling action on the inner rectangle? That should keep it centered.

Registered forum members do not see this ad.
I am creating a dynamic block for ceiling air diffusers. It has two core parts to it, the face and the neck. The face is the exposed part you see in the ceiling and the neck is what the ductwork attaches to behind the face. Now these are both variables, you can have a 24x24 face with a 4x4 neck all the way up to a 20x20 neck depending on how much air you want to flow. So I have a rectangle, that represents the face, that I can stretch to any size I want and I need another rectangle inside it that I can stretch to any size BUT the inner rectangle has to always remain centered in the outer rectangle. So I need the inner rectangle to strech out equally, both directions (left and right or up and down) from a center point. I can't use a scale action because necks can have a variety of width to length ratios. The easy way is to use two grips and manually stretch in one direction and then in the other but it would be more efficent and I'll have less errors if you could have just one grip for width and one for length.
Well hopefully someone understands thisTIA for any help!
You can download my current dynamic diffuser block her:
http://columbiahvac.com/public/dynamicdiffuser.dwg
Not that it's not complete, I still have so work to do on the look ups for different looks, but you can see I have a round neck that sizes and centers properly and a rectangler neck that doesn't.


Wouldn't that be a scaling action on the inner rectangle? That should keep it centered.
A baby seal walks into a club....

Actually scaling works great if your keeping the same width to length ratio (x, y ratio?), and it works great for round necks as you can see from my existing file (link is on my first post). For rectangular necks it doesn't work so well because grills are not always 24x24 with a 8x8 neck, sometimes there 24x12 with a 8x4 neck or any number of combinations. So if I start with a 4x4 neck, I can scale it to 8x8 no problem and it will stay centered, but I can't scale it to 8x4 so inthis case I need to stretch rather than scale.
Draw a rectangle. In the Block editor create a horizontal linear parameter between the upper corners and keep only the left grip. Now add a stretch action to this parameter. With the stretch frame select the left side of the rectangle. As objects to stretch select the rectangle and the grip of the parameter. And here is the trick: add an other stretch action to the same parameter. With the stretch frame select the other side of the rectangle (the right one). As object to stretch pick the rectangle and SET THE MULTIPLYER TO -1. Close the block editor. If you drag the grip horizontally it will change the rectangle symmetrical.
An other way: create a linear parameter and add a stretch action with multiplier 2 and a move action with the multiplier set to -1.
This info should be enough for start. Good luck!
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.
Coooo, It's taken much of the day (on and off) but I have finally got that idea to work. I like these dynamic blocks but it takes lots of attempts before they do anything remotly like I'm expecting. Where did you find that -1 trick, or should I already know about it?
"That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
Dave


Worked like a charm! Thanks!
A baby seal walks into a club....
Yes, the Dynamic blocks are great!![]()
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

Thanks Fuccaro, excellent solution. I was finally able to finish The block and yes dynamic blocks are great, this one will end up saving me a ton of time in the long run. Thanks again for the help!
Just incase your inerested in seeing the finished block you can DL it here:
http://columbiahvac.com/public/DynamicDiffusers.dwg
After this first step probable you will find interesting the lookup parameter. If your air difussers are with predefined sizes you can preset those dimensions.
Just a suggestion...
It's nice to be nice, but sometimes is nicer to be evil!.
![]()
Tip: Please do not PM or email me with CAD questions - use the forums, you'll get an answer sooner.

Registered forum members do not see this ad.
and a good suggestion it is.![]()
I did indeed use lookups for a few things in the block, common sizes is one I have now added.
Thanks again for all the help Fuccaro!
Bookmarks