Wednesday, May 19, 2010
Phew. What a title for a post! But, basically, that's what it is.
To explain: I was looking for a way to make dynamic shelves, where I could not only determine the distance between the individual boards, but also the number of them. Simply put: I want a family where I can say: shelve A has three boards that are 40cm apart, while shelve B has four boards that are 45cm apart.
To get to grips with the technique I first made a trial family, using my trusted cubic meter:
I then set up a family using the Generic Model  Floor Based template, because my cubic meter sits on the floor. You should use the appropriate template when using this technique for other things.
Anyway. I loaded the cube into the family, and placed it at the center of the family. I then created a reference plane to the right and gave it a defined distance with a parameter calles "distance". (If this is too fast for you, please read the manual on dynamic families and labels.)
OK. Now comes the tricky part. I then went ahead and created an array from the cube, and selected the following settings:
I then made the array strecht from the central reference plane to the one I had set up.
So far so good. The next step is to create a parameter for the number of cubes in the array. Select the cube, and a temporary dimension will pop up the the number of items on it. This you can select and add a parameter.
Well. That's it for the basic setup. Now comes the "programming part":
Open the Family Types dialogue box and set it up in the following way:
Create a parameter called "block distance" (or whatever :) ) and group it under Dimensions. (This is not strictly neccessary, but helps with usability for others.) This is the distance between the cubes  more precisely the distance between the centers of the cubes.
I then let the distance be calculated by multiplying the number of cubes (minus one) with said distance.
And presto, it works!
Labels: Dymanic Families, Families, R2010, R2011
1 Comment:

 Anonymous said...
January 27, 2012 at 10:23 AMproblem with this method is you can only have a minimum of two in the array. what if you wanted to have just the one ?
Subscribe to:
Post Comments (Atom)