I've been trying to creat a block for a LED strip that has a linear array and will remain centered in the strip. I've tried something similar in the past and I've always had the same problem. Anyone has any ides?
Thank you in advance!
Solved! Go to Solution.
Solved by Libbya. Go to Solution.
Solved by Libbya. Go to Solution.
its exactly that. That s really cool! Thank you.
If you dont mind me askings how did you do that? Because I m trying to reverse engineer it but I cant seem to understand what you did.
Sure, happy to explain. The parameter that drives the block is Distance1. There are two other chained parameters, Distance2 which arrays to the right and Distance3 which arrays to the left. I had to add a second circle in the middle in order to array to the left. The arrays remain centered by the coordination of the two stretch actions. On the right side, Stretch moves the right side of the rectangle and the right side of Distance2 with a distance multiplier of 1 and Stretch1 moves the left side of Distance2 and the right side of Distance3 with a distance multiplier of 0.5 (it also moves the flip and alignment grip in order to keep those centered). The block would work fine like that except that you have a base point parameter added and there is a bit of a bug when the basepoint is moved that messes up the movement of the array. Because of this, in order to keep the base point centered, I had to add the two move actions (multiplier of 0.5) and move both the base point and the Distance2 and Distance3 parameters. The left side has the same actions that move everything to the left in the same manner.
Here's one more version that is cooler, IMO. It avoids the awkwardly long lengths just before two more arrayed objects pop on. Unfortunately it has a limited length. If a longer length is required, more values would need to be added to the lookup table that has Distance1 as an input.
Really cool. Thanks for taking the time do this and to explain it. I know lookup table are really usefull but i have to get better at using them!
The Lookup1 parameter can be seen in the EVEN visibility state. It has two tables associated with it (Lookup1 and Lookup2). If you are not seeing both tables, you need to make the system variable BACTIONBARMODE=0. Distance1 is on the Lookup1 table and determines the times when the visibility state switches between ODD and EVEN. The visibility state is switched on the second table (lookup2).
@Libbya ,
That is an impressive solution to keep an array centered. You continue to inspire, Andrew.
Would you agree the solution may have been easier if dynamic blocks supported a mix of Parameters/Actions with Geometric/Dimensional Constraints?
Your solution to change visibility states with Stretch Action was very helpful.
I would ask for some more clarification on your solution if you would please?
I am working on a stair tread and will need similar array-centering functionality. I tried using Geo and Dim Constraints, but quickly ran into problems with Parameters and Actions.
Thank you for your continued generosity. I look forward to your reply.
Kind regards,
Jerry
Have a look at this block which I did for someone else recently who asked for an array to start at a centre point
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.
That looks useful. I will study it more. Thanks.
Regards,
Jerry
I will be able to apply your solution on another block I am developing. Thanks.
In the case of the BA-LED STRIP example, it would not be necessary to have the second circle overlapped in the middle if you will only stretch on one side (one grip), correct?
For the stair tread, I planned for the user to insert the block on the left/bottom stringer, select Top vis state, and then stretch to the other stringer. As the block stretched, the array increases and stays centered. I hope to post when it's complete.
Regards,
Jerry
@JBerns wrote:
@Libbya ,
That is an impressive solution to keep an array centered. You continue to inspire, Andrew.
Would you agree the solution may have been easier if dynamic blocks supported a mix of Parameters/Actions with Geometric/Dimensional Constraints?
Your solution to change visibility states with Stretch Action was very helpful.
I would ask for some more clarification on your solution if you would please?
- In the Lookup1 table, you have entries with a mix of parentheses and brackets. Is there a functional difference between a parenthesis and a bracket?
E.g. (100.0000,150.0000),(200.0000,250.0000],(300.0000,350.0000],(400.0000,450.0000],(500.0000,550.0000],(600.0000,650.0000]- What documentation did you use to discover this double-lookup and parameter list functionality?
I am working on a stair tread and will need similar array-centering functionality. I tried using Geo and Dim Constraints, but quickly ran into problems with Parameters and Actions.
Thank you for your continued generosity. I look forward to your reply.
Kind regards,
Jerry
Dynamic blocks do support combining constraints and dynamic parameters, but it usually doesn't work out very well. I think that in order for them to play well together the dynamic parameters/actions would need to be able to dynamically alter dimensional constraints. At this point, as a general rule, if it can be done without geometric or dimensional constraints, it is easier to do with only dynamic parameters/actions. In most cases, constraints cause more problems than they cure. There are a few special situations that can only be accomplished with constraints, but those are quite rare.
Yes, there is a functional difference between parentheses and brackets. This follows mathematical conventions exactly for range values. Range values take the form of a beginning bracket/parenthese, a value, a comma, a higher value, and an end bracket/or parenthese. The two values are the extremes of the range. The range includes all values between the extremes. If a bracket is used next to a value, the value is included in the range. If a parenthese is used next to a value, then the value is not included in the range. If you have a range value that only has one value and a comma then the range includes all values in the direction of the missing value. In other words, the range value of [12,) would include all values greater than and equal to 12. A range value of (12,) would include all values greater than 12 (it would not include 12). Most of my understanding of dynamic blocks and more specifically lookups and double lookups comes from experimentation. There is some info on the single lookups and range values in the AutoCAD help and it is helpful but contains several errors.
@JBerns wrote:
In the case of the BA-LED STRIP example, it would not be necessary to have the second circle overlapped in the middle if you will only stretch on one side (one grip), correct?
For the stair tread, I planned for the user to insert the block on the left/bottom stringer, select Top vis state, and then stretch to the other stringer. As the block stretched, the array increases and stays centered. I hope to post when it's complete.
Regards,
Jerry
You can only use objects in a single array. It is possible to array them two directions if you start with overlapping objects. If you only need to array a single direction, then only a single object is needed.
@Libbya, I'm trying your solution for a block I've made with a railing and uprights to support it (which need to be spaced 1000 mm from each other).
But the block only places extra uprights when I stretch it that far that it can always place an odd number of uprights.
So one upright stays centered all the time.
What I'm trying to do is from the moment the railing is longer than 1000 mm it places an extra upright and the whole thing can be mirrored from the center.
Basically the railing can never be longer than 1000 mm unsupported.
e.g. when the railing is 2500 mm there should be 2 uprights.
<- 750 mm <-> upright <-> 1000 mm <-> upright <-> 750 mm ->
Instead it just keeps one upright centered .
Attached you can find my block.
Many thanks in advance!