TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: Barry Clark on March 02, 2007, 10:09:00 AM

Title: Stretch and move?
Post by: Barry Clark on March 02, 2007, 10:09:00 AM
ok, this one I haven't been able to figure out on my own.

Lets say I have to entities: a rectangle and a circle. As a dynamic block, I want to be able to stretch the rectangle in a linear fashion along an x and y axis. No problem there. What I also want to happen is to have the circle stay centered in the rectangle no matter how I stretch it. I have gotten this with scale but that isn't what I want to acheive here.

Thanks!
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 10:30:33 AM
I did try having two stretch actions with the multiplier of one of them set to .5 but that only worked once then the stretch arrows became independent.
Title: Re: Stretch and move?
Post by: David Hall on March 02, 2007, 10:41:33 AM
I got this from adesk on something similiar
Quote
Basically after creating the X axis stretch, you will add a second stretch action associated with the first distance, then modify its angle offset by 90 under properties.  That way for every one unit on x, you stretch one unit on y as well.  Let me know if you have any other questions on this.
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 10:44:08 AM
Crap, I didn't think of that.

Thanks.

I really wish that this dynamic block stuff worked on attributes as well.
Title: Re: Stretch and move?
Post by: whdjr on March 02, 2007, 11:33:59 AM
Crap, I didn't think of that.

Thanks.

I really wish that this dynamic block stuff worked on attributes as well.

What about attributes does it not do?
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 12:10:51 PM
When you have an attribute associated with an action, it does nothing. Let's say you have a line with an attribute in a block. If you have the line and the attribute associated with the rotate or stretch or move action, the line will behave as you want but the attribute stays put.

That is my experience anyways.
Title: Re: Stretch and move?
Post by: Josh Nieman on March 02, 2007, 01:20:12 PM
When you have an attribute associated with an action, it does nothing. Let's say you have a line with an attribute in a block. If you have the line and the attribute associated with the rotate or stretch or move action, the line will behave as you want but the attribute stays put.

That is my experience anyways.

Have you tried attsync'ing the block after performing actions?
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 01:41:15 PM
Have not even heard of that one. I will have a looksee.
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 01:48:53 PM
I checked into that... and nothing changed. What exactly is this supposed to do?
Title: Re: Stretch and move?
Post by: David Hall on March 02, 2007, 03:11:13 PM
I think I use battman to synch my attributes, and they move to the new locations
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 03:30:13 PM
I tried BATTMAN and still nothing happens.
Title: Re: Stretch and move?
Post by: Barry Clark on March 02, 2007, 04:29:20 PM
OK, I played around a bit and I figured out what I was doing wrong. The att's must be made in in 07 - or possible a release that has dynamic blocks- for the att's to work like the other entities in the block.

So, the solution is, recreate the att's from the beginning and you should be good to go.
Title: Re: Stretch and move?
Post by: mjfarrell on March 02, 2007, 04:45:14 PM
One might even consider adding an alignment parmeter to the attribute within the block such that it stays aligned to the linear object it is supposed to follow.
Title: Re: Stretch and move?
Post by: whdjr on March 05, 2007, 10:06:20 AM
When you have an attribute associated with an action, it does nothing. Let's say you have a line with an attribute in a block. If you have the line and the attribute associated with the rotate or stretch or move action, the line will behave as you want but the attribute stays put.

That is my experience anyways.

The trick is you have to select the attribute and then go into the properties window and select 'YES' for 'Lock Position'.  Then it will follow what ever action you associate with it.
Title: Re: Stretch and move?
Post by: Barry Clark on March 06, 2007, 10:48:57 PM
Oh... funny enough, I thought that meant the opposite of that. haha. I thought that it meant that locking the attribute into position meant that it wouldn't move. haha. Sorry.
Title: Re: Stretch and move?
Post by: whdjr on March 07, 2007, 10:09:54 AM
Yeah...It is backwards thinking isn't it...That 's just AutoCad for you.  :-)