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

Automatic Maximum Spacing of Array Columns and Number Of Objects

13 REPLIES 13
Reply
Message 1 of 14
CJCAED
3317 Views, 13 Replies

Automatic Maximum Spacing of Array Columns and Number Of Objects

I am trying to create a block who's make-up is simple but function is complex.  I have a symbol, let's call it a circle, that I want to essentially array across a single row.  I want to be able to stretch the "array distance" between two defined points, almost like you would create a linear dimension.  Within that distance, I want to copy my circle symbol so that the center line distance between them does not exceed a certain maximum, which varies.  For this example, let's call it 24".  So every 24" I "stretch" the block, it adds a new circle.  Just like an array.  The catch is that I want to show all of my circles spaced evenly, as long as the resulting spacing is equal to or less than 24".

 

To clarify, let's say I have an 80" span over which I want to show my circle symbol, and the maximum center line spacing of the circle is 24".  Over that 80" span, I should see 5 circles: 1 at each end and 3 spaced evenly in between.  The spacing between the 5 circles will be 20".  If I change my mind and what it to cover 84", I will still have 5 circles, but I want them to re-space themselves at 21".  But if I decide to cover 98", I'd need a 6th circle and spacing at 19.6".

 

Does this make sense?  Am I looking at a block, or can this be done somehow with a simple rectangular array?

13 REPLIES 13
Message 2 of 14
Libbya
in reply to: CJCAED

A simple rectangular array will not do it automatically, but can do it in a few steps.  Set the number of rows to 1, set the column spacing to 24, stretch the array out to your desired distance to create the correct number of objects minus 1 (unless the distance is exactly correct for the number of objects), enter your desired distance into the array properties, add one to the number of objects in the array if the distance was not exact for the number of objects.  Alternatively, this screencast shows how to make a block that would do that automatically.  It is limited, though, and each additional item requires a fair amount of additional work in setting up the additional move actions.  The switching is accomplished using visibility states and a double lookup (make sure bactionbarmode=0 to see both tables).  You would not be able to dynamically change the max spacing.  If you decided you wanted 25" max spacing, you would need to change all the values in the lookup table.  

Message 3 of 14
CJCAED
in reply to: Libbya

Thanks.  Yes, you've confirmed what I essentially knew.  I don't mind the idea of the block, or even the work involved in creating it, however for our purposes, our max spacing can mean anywhere from 6" - 24" over spans up to 20 feet or so.  That's a LOT of visibility states!  The work involved in that, plus the overhead I would expect it to create in the drawings, especially with potentially 100 instances of the block or more, is probably prohibitive.

 

This one is going to take some extra thought, I think!

Message 4 of 14
Libbya
in reply to: CJCAED

I think under those conditions I would choose the rectangular array command.  Its use requires wearing your thinking cap, though.

Message 5 of 14
ojuris
in reply to: CJCAED

hi!

 

try this block - may be that is what you need

Message 6 of 14
Emmsleys
in reply to: CJCAED

Following up on your thread, were you able to find a solution or a workaround?

 

Did any of the posts in the thread help with the issue?

 

Please use the Accept as Solution for those post’s that helped. It may benefit other users who might have a similar question or issue.

 

Thanks for your time.



Sarah Emmsley
Technical Support Specialist

Message 7 of 14
RichardGeyer4241
in reply to: ojuris

Nice!  Simple and eloquent solution.

Message 8 of 14
Sujan.Maharjan
in reply to: ojuris

parameter_manager.pngHi, Some Explanation on this please.


"Revit Lies in the tension between what we want to do and what can be done!"
Message 9 of 14
Libbya
in reply to: Sujan.Maharjan

Sujan, if you open the block in block editor and select the circles, you will see that they are an array.  When you look up at the ribbon it will give you the contextual array options.  If you click on Columns, you will see that the value there is the user parameter 'Number' and if you select Between you will find that the value there is the user parameter XDist.  When you look at the parameters manager and evaluate the formulas for those two user parameters, it becomes clear.  MaxDist user parameter establishes the maximum distance between columns in the array.  Number takes the value of D1-30 (the offset distance D1 is to either side of the array) and divides it by MaxDist, rounds it off and adds 1.  That will always give the minimum number of arrayed objects to avoid exceeding the maxDist.  The XDist uses a formula to return the distance between objects.  Overall a very clever and useful method of controlling arrayed objects.  Big kudos to Ojuris for presenting that and I will certainly use that and expand on it in the future.   

Message 10 of 14
Anonymous
in reply to: Libbya

I hope someone is able to help.  I have attached a zipped file of a handrail I have been working on and I almost have it complete.  In the file, I have 2 main dynamic blocks I was testing out.  I have copied each instance and manipulated the block to show the issues.  Essentially my issue is with updating the midrail. 

 

My block is created very similar to the Test Block Window from above, I just want to add lines in between each of the circles.

 

Any help would be great.

 

Thanks,

 

Matt H

Message 11 of 14
Anonymous
in reply to: ojuris

Hi ojuris.

 

I'm a newbie to Dynamic blocks and have been tinkering with a gutter dynamic block but to no avail, came across your post with the Test Block Window dynamic block, which is how I'm aiming for my dynamic block to work. I have pretty much followed your setup but for some reason I can't get my gutter brackets to array at a maximum of 1.2meters when stretching. I presume it might have something with the array property association. May I please ask if you could have a look at it and see where I'm going wrong. Thanking you in advance

Message 12 of 14
Anonymous
in reply to: ojuris

Hi Ojuris

 

I made a gutter BD, but had difficulty getting the gutter brackets to center arrayed to a maximum. Came across your post with the test block window DB which is exactly how I would like mine to work. I have redone my DB based on yours but am having a hard time to get it to work with the array.I think it might have something to do with the array parameter. May I be so bold as to ask you to have a look at the DB for me and see what I'm doing wrong. I have attached my original DB and the new DB base on yours. Thanking you in advance.

Message 13 of 14
jamncar
in reply to: ojuris

I am unable to figure out how to convert this block to imperial. Any tips? I am trying to reverse engineer the block and create it myself...good learning experience.

Message 14 of 14
ojuris
in reply to: jamncar

If you mean that block - see attached

1. you must create 3 user parameters in Parameter manager

01.png

MaxDist is maximal distance between elements in array - you can change it in Properties window when you use the block. Parameter Number calculate how many elements you have in array and Parameter XDist calculate distance between elements in array. 30 you get summarize 15+15. All other is mathematics and I thing there is not difference between metric and imperial.

 

2.After that you must include Parameter names in array definition

Columns - 2 rewrite with Number

Between - 40 rewrite with Xdist

02.png

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

Post to forums  

Autodesk Customer Advisory Groups


”Boost