Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple vertical stretch to create a slope

9 REPLIES 9
SOLVED
Reply
Message 1 of 10
rbutcher9XZE9
340 Views, 9 Replies

Multiple vertical stretch to create a slope

Hi,

Long time user of AutoCAD, first time user of dynamic blocks and posting here. I'm using AutoCAD 2021 for this.
I am trying to create a block that is stretchable in the horizontal plane, combined with an array of objects contained therein. This works OK. But then I would like to stretch in the vertical axis from either end of the horizontal object to get a different distance at each end.
The attached dwg includes a Default block that I have attempted and just doesn't maintain its shape once I start stretching vertically. The Example shows what I would like to get as the result with the green element sloping and everything within the red dashed box fixed in height and used in the longitudinal array.

I have included a screenshot of the block editor to show how messy it is. Any help to tidy this up and make it would would be welcome.

rbutcher9XZE9_0-1733510094931.png

Thanks.

9 REPLIES 9
Message 2 of 10

After a short look at your block I think your main mistake is the use of Dynamic Parameters/Actions side by side with Parametric Constraints. Such a mix will fail in most cases. To drive the geometry you should decide either to use only Dynamic Parameters/Actions OR to use Constraints (geometrical, dimensional). Tomorrow I can show you an example how that can be done using constraints. Before - to avoid wasting time - please show us an example how the block should look after stretching horizontally (currently you get overlapping rectangles. Is that your intention?) and what shall happen if you change the value of your d1. 

 

 

 

Jürgen Palme
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

Message 3 of 10

thanks for replying. I couldn't find a way to fix some elements without using constraints. I have never used constraints or parametric blocks before.
The vertical Dimensions 1 and 2 should alter the top line, with the relevant lines also stretched and parallel to the top line. These 2 dimensions would be entered by the user of the block when creating their drawing.

The horizontal dimension should stretch the entire shape and include the array as shown. I have created it with a 600 array to leave a gap at the end which will have a move. There will be a separate block as part of the array, I have shown an overlapping rectangle for ease.

The below image is an example of the block when stretched, I realise the current block does not achieve this due to some constraints. The intention is that either end could be the same level, the left higher than the right or the right higher than the left. They would never be lower than the rectangle and its 150mm surround. I hope this helps explain what I am trying to achieve.

rbutcher9XZE9_0-1733672633223.png

 

Message 4 of 10

Thanks. But you have given us some contradictory information.

 

Please clarify.png

 

 

Please clarify

 

Jürgen Palme
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

Message 5 of 10

Thank you for being patient with me. I have not used these features before so am unfamiliar with how they work and their effects.
If I can remove all of the constraints then that would be great. The block that I shared got a bit messy as I tried to add additional constraints to prevent lines moving.
The width 'variable' should be placed under the block, with the properties visible so a user can enter an amount and it will stretch the length of the block. (this is a sectional view of a civil engineering construction)

The vertical distance (Dim 1 and Dim 2) should be located at either end of the block with Dim 2 stretching when the length of the block is stretched.

I have attached a modified block which has the horizontal stretch and array working as I intend.

If the top lines cannot be parallel then that would be ok. I will be adding some hatching into these areas and hope its a simple operation to stretch these, as shown in the 'Test block no slope' file.

rbutcher9XZE9_0-1733735766540.png

 

Message 6 of 10

Thanks. But I'm not yet 100% sure what you need. Instead of asking again I show a first attempt how I understand your intention. Test the attached dwg file and let me know if I'm on the right way. The video shows how it works currently.

 

 

 

The block is completely driven by constraints. It is rather complex and reacts very slowly to changes in the variables.

I think some improvements could be possible, but to do so a lot of work.
Perhaps one of the experts finds a solution without using constraints.

 

 

Jürgen Palme
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

Message 7 of 10

The drawing that I downloaded did not quite work the same as your video, some of the hatch does behave correctly (see below screenshot). It is also a lot slower than you show which would be problematic. 

The video behaves how I would like the block to perform, although it is slow. Eventually I would like to add different visibility states to replicate these same movements over a range of blocks.

rbutcher9XZE9_0-1733835906593.png

 

thank you for getting this far. If anyone else is able to replicate the functions in the video, but making it faster then I would appreciate it.

Message 8 of 10

Small cause, big effect.  :winking_face:

Try this improved version please. 

 

 

 

 

Jürgen Palme
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

Message 9 of 10
j.palmeL29YX
in reply to: j.palmeL29YX

Attention!

While a deeper testing of my last posted version (Test block - pa2.dwg) I found an error: If you set the variables "Left" and "Right" (in your block "Dim1" and "Dim2") to the same value, the block "freezes" and does no longer react if you try to change  one of the three variables. 

Workaround: Reset the block (RMB -> Reset Block) to its initial values - now it works again like a charm. 

 

I'll try to find what causes the problem and how to repair it. 

 

 

 

Jürgen Palme
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

Message 10 of 10

Thank you for your assistance with this. I now have a working block, without the parallel top elements. But it works without using any constraints.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report