TheSwamp

CAD Forums => CAD General => Dynamic Blocks => Topic started by: Daniel J. Ellis on April 07, 2016, 09:06:24 AM

Title: Keep the stool in the middle of the table
Post by: Daniel J. Ellis on April 07, 2016, 09:06:24 AM
I'm working through, converting our furniture library into dynamic blocks.  we have a standard dressing table symbol that is a rectangle for the table and a circle for the stool in front of it.

I've set all of this up no problem, and created a stretch action to make the table width variable.  I've even managed to make the attribute adjust itself to the width of the table!!

What I've not been able to do, though, is make the stool move so that it stays centred on the table.

The block's attached, any hints would be greatly appreciated.

dJE
Title: Re: Keep the stool in the middle of the table
Post by: mjfarrell on April 07, 2016, 09:11:17 AM
suggest a 'symmetrical' constraint on the stool

*EDIT*
 A dimensional constraint will also work see block below
Title: Re: Keep the stool in the middle of the table
Post by: Nibster on April 07, 2016, 09:23:32 AM
modify the move action to ".5" in the Distance Multiplier field of that action's properties.  The move action being associated with the parameter that controls the length of that side is the correct way.
Title: Re: Keep the stool in the middle of the table
Post by: Nibster on April 07, 2016, 09:28:09 AM
you associated the move action with the wrong end of the linear parameter.
Title: Re: Keep the stool in the middle of the table
Post by: mjfarrell on April 07, 2016, 09:32:08 AM
see attached
Title: Re: Keep the stool in the middle of the table
Post by: Nibster on April 07, 2016, 09:40:12 AM
suggest a 'symmetrical' constraint on the stool

*EDIT*
 A dimensional constraint will also work see block below
I agree, there's many ways to skin your prey.  However, there's also rarely anything more frustrating than doing the proper steps and not knowing why it doesn't work.  I appreciate when I am shown where my errors lay. 

Have to admit I shot off my first post without looking at the attached block and that I got to edit it to make it look like I did.  Otherwise I would have addressed the grip association issue then.
Title: Re: Keep the stool in the middle of the table
Post by: mjfarrell on April 07, 2016, 10:20:50 AM
did you review my block?
Title: Re: Keep the stool in the middle of the table
Post by: Nibster on April 07, 2016, 11:08:57 AM
did you review my block?
um....  :nerdyembarassed:
Title: Re: Keep the stool in the middle of the table
Post by: Lee Mac on April 07, 2016, 12:15:27 PM
modify the move action to ".5" in the Distance Multiplier field of that action's properties.  The move action being associated with the parameter that controls the length of that side is the correct way.

This is how I would approach it also (see attached example).
Title: Re: Keep the stool in the middle of the table
Post by: Daniel J. Ellis on April 08, 2016, 04:02:43 AM
Just got in this morning (had to work late last night so didn't review the thread before leaving the office as I'd intended) and read the thread, thank you everybody (thank everybody?) for your contributions and suggestions.

I am half way through a properly reply which I'll have to finish over lunch but for now thankyou all.

dJE
Title: Re: Keep the stool in the middle of the table
Post by: Daniel J. Ellis on April 08, 2016, 08:35:42 AM
As promised, a full response to the thread, including what I hope is a clear step-by-step guide:

did you review my block?

I have done now, thankyou.  I'd read somewhere that action grips and constraints don't play well together, although that doesn't seem to be the case in this instance.  I think for simplicity's sake a move action's the way to go now, but it's certainly something I'll try to remember for more complicated geometry.

I agree, there's many ways to skin your prey.  However, there's also rarely anything more frustrating than doing the proper steps and not knowing why it doesn't work.  I appreciate when I am shown where my errors lay. 

Have to admit I shot off my first post without looking at the attached block and that I got to edit it to make it look like I did.  Otherwise I would have addressed the grip association issue then.

I must admit I'm still not 100% what I was doing wrong but I've managed to edit Lee's block to reproduce it, and edited my block to also work properly, so I must've been missing a click somewhere.

While I was trying to search the web for how to do this, I found a lot of replies that were along the lines of "set the distance multiplier to 0.5" and just left it at that.  In an effort to help the next person who has this problem, a complete step by step guide:
1) Add linear parameter;
2) Set the linear parameter to Chain Actions=Yes and adjust the number of grips as desired;
3) Add a stretch action to the linear parameter;
4) Add a move action:
4a) Select your linear parameter;
4b) Select the endpoint of the linear parameter;
4c) Select objects to move;
5) Select the move action and set the Distance Multiplier to 0.5;
6) Test the block
6a) If it doesn't work curse loudly and repeat from step 4;
6b) If it does work pat yourself on the back proudly :)
Title: Re: Keep the stool in the middle of the table
Post by: mjfarrell on April 08, 2016, 08:49:53 AM
Quote
I have done now, thankyou.  I'd read somewhere that action grips and constraints don't play well together, although that doesn't seem to be the case in this instance.  I think for simplicity's sake a move action's the way to go now, but it's certainly something I'll try to remember for more complicated geometry.

Properly constrained they will work together, otherwise expect unexpected results.

Glad you got it worked out.
Title: Re: Keep the stool in the middle of the table
Post by: Nibster on April 08, 2016, 03:34:12 PM
...

I must admit I'm still not 100% what I was doing wrong but I've managed to edit Lee's block to reproduce it, and edited my block to also work properly, so I must've been missing a click somewhere.

...
you associated the move action with the wrong end of the linear parameter.
When I changed the linear parameter in your original block to have 2 grips, your move action worked perfectly when using the previously inaccessible grip.