DYNAMIC BLOCK with VARIABLE RECTANGLES WITH GAPS

DYNAMIC BLOCK with VARIABLE RECTANGLES WITH GAPS

sunglasspz
Explorer Explorer
1,090 Views
16 Replies
Message 1 of 17

DYNAMIC BLOCK with VARIABLE RECTANGLES WITH GAPS

sunglasspz
Explorer
Explorer

Hi there, 

i'm trying to make a dynamic block for glass railings. I searched the forum and yt, tried several solutions but I can't deal with it. Some of your solutions have already helped me a lot. I've been using cad for some time but only recently discovered dynamic blocks (I'm self-taught). Previously, I calculated it manually and used the array command, but a dynamic block would be very helpful here. I attach a file with a description of the problem inside.
Generally, the point is that the glass panes have the same width and the gaps between them have their width depending on the length of the profiles or the entire glazing.
Thank you in advance for your help.

0 Likes
1,091 Views
16 Replies
Replies (16)
Message 2 of 17

Libbya
Mentor
Mentor

That all appears very doable.  I would recommend using visibility states, one for each number of panels.  In other words, you would have one state with a single panel, one state with two panels, etc...  You can then stretch the total length however you like and the individual panels will adjust OR you can adjust the individual panels and it will adjust the total length.  The gap is a simple task for a linear parameter, a handful of stretch actions and a lookup table to control them for the two widths.  

0 Likes
Message 3 of 17

sunglasspz
Explorer
Explorer

I did something like this (attachment). In general, it all works, but I can't convert it to a dynamic block. In addition, after setting the array, the rectangles sometimes run away somewhere and i must move them. Any ideas? Is what I want to achieve even possible - to do from this a dynamic block where i only put profile lenght and number of panels and the all things do it himsefl automaticly?

 

explaining - now I have to enable the array every time when i set the parameters

0 Likes
Message 4 of 17

Libbya
Mentor
Mentor

I outlined how to make it work in my last post.  Any ideas?  Yes, the one I outlined in my last post.  Is it possible?  Yes, in the way I already mentioned.  

 

You will need a total of 10 visibility states for the dimensions you state as the smallest panel size is 500 and the largest length is 5000 or 10X the smallest panel length.  In the following screencast I show how to make two of the visibility states, how to stretch the panels equally while maintaining the gap width, and how to incorporate the gap stretch so each gap is stretched equally.  The screencast is already 26 minutes long and I did not want to spend more time on it.  The other visibility states are the exact same process except with fewer or more stretch actions depending on the number of panels.  As I mentioned in my other post, you could use a lookup to control the gap length if you want it set to only 5 or 10 (or other specific values) or as shown in the screencast, you can adjust it in properties to whatever value you choose.  Let me know if you have questions on it.  

 

https://knowledge.autodesk.com/community/screencast/36e1d66f-a87e-48ad-81fb-34ea332a968f

 

 

 

0 Likes
Message 5 of 17

sunglasspz
Explorer
Explorer

thank you for looking at my problem and taking your time to come up with a solution. Unfortunately, that's not quite what I'm looking for. Of course, your method solves my problem somewhat, but I'm looking for something more like in the attached file.
If I have 200m of such balustrades, I will have to copy blocks using your method... See the attached file - as you can see, it can be done using the array operation which is much safer (lower risk of error). Unfortunately, I have not found the development of this file and I do not fully understand how this block was developed.

 

anyway thanks, maybe someone will find your idea useful.

0 Likes
Message 6 of 17

Libbya
Mentor
Mentor

The method I posted will exactly produce what you described as what you wanted in your prior posts.  I spent a considerable amount of my spare time making that video and am somewhat put out that despite it working exactly the way you asked, you now say it is not what you want.  Explain how it is not what you want other than by stating the false claim that an array is safer and has a lower risk of error.   

0 Likes
Message 7 of 17

sunglasspz
Explorer
Explorer

in the previous post I attached the example1.dwg file where the solution was basically ready, except for the fact that it is not a dynamic block and I have to turn on the pattern and set all the parameters every time. I understand your nervousness, you took the time. As you can see, based on my example1 file, I did basically the same thing as you - with much less work. You presented a partial solution but according to your vision - not mine.
I asked a question if what I created could be converted into a dynamic block, but you wandered into your vision. As for your question: the answer is simple, if I have 132 meters to design, I have to combine / copy segments, etc. In the pattern, I set 3 parameters (total length, gap and number of pieces (if, for example, they are too wide, I only increase their number) and I'm ready without the risk of wrong copying or whatever. As I mentioned in an earlier post, I can't convert it to a dynamic block, which is what I meant.
Thanks again for your time, but you didn't take into account the example1 file that I attached and you did it according to your own idea...

0 Likes
Message 8 of 17

Libbya
Mentor
Mentor

What do you mean a partial solution?  Do you mean that I did not take the time to create all 10 visibility states that would be required to meet all the possible pattern layouts based on the property limits you stated?  After doing the actual work of assembling the block in the manner I outlined, it will function exactly as you describe.  Making the block would only be required once.  After the block was made, you would simply need to insert the block, set the overall length to any value between 500-5000, set the number of panels, set the gap width and the panels will automatically be adjusted to the exact length.  

 

How does that differ from what you are asking for?

0 Likes
Message 9 of 17

Libbya
Mentor
Mentor

I would add that I didn't start with the method shown in your 'example1.dwg' file because compared with dynamic parameters/actions, constraints require more computing power, require more memory, and are considerably less consistent in their behavior.  If there is a solution that does not involve constraints, then it is better than one that does.  I showed that there IS a solution that does not involve constraints that exactly meets what you said you wanted.

 

Again, how does the method I outlined not do exactly what you are asking for?  

0 Likes
Message 10 of 17

sunglasspz
Explorer
Explorer
Of course that's not what I meant - if you're asking about all 10 states. I wouldn't even expect that looking at the video you made...it's a lot of work - unnecessary work - why? Because if you get a dimension of 13331mm and you have to divide it into 11 symmetrical pieces, your solution will require 2 profile lengths with 4 pieces + 1 profile with 3 pieces for the division around 1000mm wide each piece and this is not what I showed in the attached file. It would be faster to count everything manually as I did before... Look at my file - set the profile to 13331, set the number of pieces and the gap - done!
0 Likes
Message 11 of 17

Libbya
Mentor
Mentor

You stated in your initial file that the MAXIMUM profile length would be 5,000.  Now you are saying that a solution based on that given maximum dimension is not valid because you want to use larger maximum lengths.  

 

Why did you state 5,000 as a maximum when it isn't?  

That is a rhetorical question.  No need to answer.  I will make no further attempts to help you with this or future issues.  Good luck with it.  

0 Likes
Message 12 of 17

sunglasspz
Explorer
Explorer

Why are you worried about my computing power/RAM? I do not work on a pentium 90 ... You write that my solution is less consistent? I'm 100% sure mine is much safer, faster and doesn't require as much work on the block as yours, not least because if you get 131.5 meters of railing like this you'll drown thinking how to split the segments you've created... I'll count it by hand faster than you assemble the blocks into these 131.5 m and put them together... Your solution has limitations and additionally requires a lot of work - the same work that in my file you do in 1 min. And much safer than your solution.
If you are asking - "Again, how does the method I presented not do exactly what you are asking for?" I answer - the world does not consist of 1-5m sections and that's what you suggested. In my file you can set any length and divide it with 2 parameters in an array of equal lengths... more pragmatic? 

0 Likes
Message 13 of 17

Libbya
Mentor
Mentor

@sunglasspz wrote:

...If you are asking - "Again, how does the method I presented not do exactly what you are asking for?" I answer - the world does not consist of 1-5m sections and that's what you suggested....


That is NOT what I suggested.  That is what YOU suggested!  WTF?! \

 

capture_003_26022023_153318.jpg

 

 

0 Likes
Message 14 of 17

sunglasspz
Explorer
Explorer


That is NOT what I suggested.  That is what YOU suggested!  WTF?! \

 


 yes and right after that I attached a file with a description of the solution I am looking for with clear information: 

 


 

I did something like this (attachment). In general, it all works, but I can't convert it to a dynamic block. In addition, after setting the array, the rectangles sometimes run away somewhere and i must move them. Any ideas? Is what I want to achieve even possible - to do from this a dynamic block where i only put profile lenght and number of panels and the all things do it himsefl automaticly?

 

explaining - now I have to enable the array every time when i set the parameters

 


So...stop...

0 Likes
Message 15 of 17

Libbya
Mentor
Mentor

I understand how the Array SX.dwg file that you posted works.  As you said, apparently you don't.  One interesting thing to point out about that function is that you can alter the spacing of the items and the number of the items, but you cannot dynamically alter the arrayed items themselves (if the array is formed using the ARRAY command).  If you are fine with the panels remaining the same size regardless of the number of panels or the spacing, then it should work great for you.  Of course, you could attempt using a dynamic array parameter and action which DO allow you to dynamically alter the arrayed objects, but the dynamic array parameter/action is limited by the fact that it does not allow you to dynamically alter the column offset (spacing).  If you want to both dynamically alter the array spacing (so there are more or fewer items for a given profile length) AND dynamically alter the arrayed objects (adjust the size of the panels to match the spacing), AND you want those functions within a dynamic block, then you are SOL. It is not possible. 

 

@sunglasspz wrote:

 In addition, after setting the array, the rectangles sometimes run away somewhere and i must move them.


"The rectangles sometimes run away somewhere" because of the inconsistent way constraints behave and the inconsistent way constraints behave is the main reason that I posted the solution I offered (which met all of the initial criteria you requested).  


It is unfortunate that you erroneously posted the 5000 unit max as a desired property in your initial file.  If you had not posted that misleading nonsense initially, it would have saved a lot of time and effort.  

0 Likes
Message 16 of 17

sunglasspz
Explorer
Explorer

I understand how the solution in the array sx file works. I was confused by the dynamic block in this file which doesn't add anything there. On this method (slightly changed) I made my file - attached. I set the length of the profile, the number of pieces (X) and make an array in the path option, where in the "elements" parameters I substitute X and in "between" - col. The solution works - it is not a dynamic block, but apart from that, the solution meets all my expectations. I can set a gap (even 2 different ones - from the beginning of the profile (GAPSC) and between pieces (GAPSZK) but I have to do it before applying the array. If it's not possible to do it in a dynamic block, this must suffice.
The second option is to set the d1 and x parameters, thanks to which the length of the SZP is known, then the function copy in multiple mode + selecting the option copy in a array where the amount is x and the spacing = col values and it also works. You can only rewrite the SZP function to some line that would transfer its length to a rectangle (now it copies them together with the entire SZP formula).


"The rectangles sometimes run away somewhere" because of the inconsistent way constraints behave and the inconsistent way constraints behave is the main reason that I posted the solution I offered (which met all of the initial criteria you requested).  


It is unfortunate that you erroneously posted the 5000 unit max as a desired property in your initial file.  If you had not posted that misleading nonsense initially, it would have saved a lot of time and effort.  


I fixed the file - the forms don't run anymore, the reason was the path (the line according to which the elements are arranged), the base point and others.

You are right, it was unnecessary although in reality it is (the profile is 5000mm). However, I quickly realized that it is not the profile and 5000 will be the determinant, but the entire length, e.g. 7566mm or 133.2m, which will have to be made of several profiles, sometimes of different lengths, so I sent a second post.

I thanked you for your time, willingness and somewhat solving my problem.
As I wrote, I am new to dynamic blocks.

0 Likes
Message 17 of 17

Libbya
Mentor
Mentor

I actually broke the boundary of possibility and figured out how to get the block working with infinite array, dynamically alterable panel width and height within the ranges you specified, alterable gap, the ability to set any number of panels, and all housed within a dynamic block.  I was mistaken when I said it was impossible.  However, it is quite complicated to create and the amount of free time I am willing to donate to assist someone who has communicated in such an abysmal manner has long since been exhausted and so I will exit the conversation at this point.  Good luck with it.  

0 Likes