Snap objects to the end point

Snap objects to the end point

vladop
Advisor Advisor
1,714 Views
20 Replies
Message 1 of 21

Snap objects to the end point

vladop
Advisor
Advisor

As seen in the attached video, using the stretch action with the point parameter and vertical constraint I achieved that when stretching the vertical line remains vertical and that the bottom point of the vertical line remains at the same height.

 

(view in My Videos)

 

How do I make the attributes and geometry along and below the vertical line move as if they were glued to the bottom point of the vertical line.

 

vladop_1-1763908189418.png


It doesn't help if I include these objects in the stretch action, because if the stretching is done up or down, then the objects also go up or down, they remain aligned with the bottom point of the vertical line only along the X axis.

 

vladop_2-1763908577604.png

vladop_3-1763908720332.png

 

I had the idea to fix the second point parameter to the bottom point of the vertical line, set the chain action to YES, and then add a move action for all objects that should remain glued to the bottom point of the vertical line. I haven't found a way to fix the second point parameter to the bottom point of the vertical line.
Maybe there is another way?


Attached is a drawing with a block.

0 Likes
Accepted solutions (3)
1,715 Views
20 Replies
Replies (20)
Message 2 of 21

vinodkl
Mentor
Mentor

Hello @vladop 

 

This can be achieved without using constraints. You need to include the whole vertical line in the stretch action and also add in the attribute in the selection. Please find the updated block attached.

--------------------------------------------------------------------------------------------------------------------------
ವಿನೋದ್ ಕೆ ಎಲ್( System Design Engineer)
Likes is much appreciated if the information I have shared is helpful to you and/or others.

Please mark "Accept as Solution" if my reply resolves the issue or answers your question, to help others in the community.
--------------------------------------------------------------------------------------------------------------------------
0 Likes
Message 3 of 21

vladop
Advisor
Advisor

@vinodkl thanks for your reply
The bottom point of the vertical line and the objects next to and below it should remain at the same Y coordinate.

vladop_0-1763973923351.png

 

0 Likes
Message 4 of 21

h_s_walker
Mentor
Mentor

@vladop You just needed to change the size of the window @vinodkl did and remove the text and rectangles from the stretch. See the attached drawing

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 5 of 21

vladop
Advisor
Advisor

The line should remain vertical.

0 Likes
Message 6 of 21

h_s_walker
Mentor
Mentor

@vladop try the attached. I cheated a bit.

I used a Polar parameter and started it from the text and ended it at the junction of the two lines. I also set the angle at 90 so it would only move up and down.

I started it from the text so that the lines would not go past the text. You could set a minimum value so it won't.

I've also created one with a linear parameter (green circle) so you can choose which one you want to use.

 

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 7 of 21

vladop
Advisor
Advisor

@h_s_walker thanks for the repay, I'll try to explain how it should work in another way.
Stretch point (1) should be free, i.e. move in both X and Y directions.
Line (2) should remain vertical, and its lower point (3) should remain at the same height, i.e. point (3) should keep its Y coordinate and take over the X coordinate of stretch point (1).
Other objects (4) should remain attached to the lower point (3).

vladop_1-1763979174128.png

 

0 Likes
Message 8 of 21

vladop
Advisor
Advisor

In the block I sent at the beginning, stretch point and line behave as they should, only the objects do not follow the lower point of the vertical line.

0 Likes
Message 9 of 21

h_s_walker
Mentor
Mentor
Accepted solution

@vladop Try my updated block. It uses an xy parameter. If you add a stretch to an xyparameter it gives you the option of stretching in xy, y or x. I've added an extra stretch to it and added the items at the bottom and changed the stretch so it just stretches in the x direction.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 10 of 21

vladop
Advisor
Advisor

That's it, thanks a lot.
I'll take a look later to see how it's done.
The only problem is that it can't be stretched to the left of the center of the circle.

0 Likes
Message 11 of 21

vladop
Advisor
Advisor

I moved the start of the X parameter to the left and I think it's fine now.

vladop_1-1763981102139.png

 

0 Likes
Message 12 of 21

h_s_walker
Mentor
Mentor
Accepted solution

@vladop Updated block attached. I just added a point stretch and used that to stretch the xyparameter, which I chained to the point stretch. I also turned off all the grips for the xyparameter,

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 13 of 21

vladop
Advisor
Advisor

Perfect!!!

Thanks again!

0 Likes
Message 14 of 21

vladop
Advisor
Advisor

The block that @h_s_walker created works great, but it could still be improved with some new features.

 

Тhe video shows that I added two things:

- stretch action to stretch fields containing numbers

- alignment parameter to align the block with the line.

(view in My Videos)

 

Inserting the block at an angle opens up a new issue that I can't seem to solve.

Is it possible to automatically rotate fields containing numbers and the line they are attached to in the opposite direction to the rotation angle of the entire block?

vladop_0-1764066523440.png

I searched the forum and other sites, there is something that looks like it, but I haven't been able to do it.

Аttached is a drawing with a block with stretching and alignment added, which is what I knew how to do.

 

0 Likes
Message 15 of 21

h_s_walker
Mentor
Mentor

@vladop unfortunately you can't use the alignment parameter to do what you want to do as the alignment parameter rotates the whole block

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

Message 16 of 21

vladop
Advisor
Advisor

OK thanks!

0 Likes
Message 17 of 21

vladop
Advisor
Advisor

Actually, I was thinking of adding a rotation action for these objects and connecting it to a block rotation, or rather a negative block rotation.

 

0 Likes
Message 18 of 21

vladop
Advisor
Advisor

I came across this page at the beginning and it should be what I'm looking for, but I don't understand the procedure given at the end in the last post:

Dynamic block rotation - AutoCAD Drawing Management & Output - AutoCAD Forums

0 Likes
Message 19 of 21

Brock_Olly
Advisor
Advisor
Accepted solution

You could make the bottom part a polar stretch combination, it makes the block a bit wonkier though so it's not the best solution.
You'd have to stretch it perpendicular to the desired line but then you can stretch/rotate in one action.

 

https://i.imgur.com/t07jXOZ.mp4


Edit: Added an extra point grip at the right location

0 Likes
Message 20 of 21

vladop
Advisor
Advisor

Thanks @Brock_Olly!!!

While using the block I will see what suits me best.

I solved it by removing the alignment parameter, so that the block is always inserted vertically, and I added a rotation for the upper part. Your approach is similar, only the lower part rotates. I have not made more complex dynamic blocks so far, I am just learning some things.

Thank you all for your help.

The block already satisfies everything I need, but there are always ideas for improvement.

0 Likes