PDA

View Full Version : Component - Array Quantity and Integer Parameter



saeborne
2007-04-20, 07:10 PM
Hi all.

I'd like to create a track light fixture component, that includes both the track and the head(s).

Is the following possible:

I want to create an integer parameter to the quantity light of light fixture heads... so if I were to input a 3, the component would have 3 heads... so on and so forth.

Long story short, can I link an array property to a component parameter?

Many thanks,

twiceroadsfool
2007-04-20, 08:31 PM
You sure can. In the family, array the "Head." Highlight the object int he array, and you will see the Count value in Blue (3, in your case.) In the option bar, click the <label> and <add parameter>, and you can assign a new parameter whos value will change the number of heads. :)

You can also have it do this automatically, if you want the length of the track to define how many heads there are. Use a Line Based Family for that. Im not sure if you Nest a Lighting Family in to a Line Based Family, if it behaves properly schedule and render wise, but it might.

Heres an example with the length of the familly controlling the number of elements.

Justin Marchiel
2007-04-20, 08:44 PM
this is a godo example of a array family. The thing i dont like about the array with an interger, is that if i divide the lenght by x amount there will be instances where the item being arrayed will no array at the correct lenght.

example if i have an object that needs to be every 4" and i take the value to be and the line is 13" i will get 3.25 which would be 4 pieces making the array not quite 4". if i add a -1 to the parameter, when i need the even amout i lose 1. This is a simple example but hopefully everyone sees my point.

I liike what you did by creating the void at the end with the one off pieces, but is there a way to get it to array with the correct length instead of an integer and maybe just not add one more to the end?

Thanks

Justin

twiceroadsfool
2007-04-20, 08:53 PM
What do you mean bu Correct Length? I am certain you can do what you seek with an if statement.
Im not sure i understand your question, but there are an almost endless amount of possibilities. You can specifiy the Distance between them, and have it calculate the number of items.

With an if statement, Im sure you could tell it to use the distance you provide IF its an even amount, and if not use the actual dimension (3.25"). You would just need a few parameters to round, and the like.

That sounds like a fun one to play with, maybe when the day is over i can tinker with it... Or am i not understanding what youre asking?

Justin Marchiel
2007-04-20, 09:34 PM
well i have an item that needs to array every 4" but if the length is not a multiple of 4 i want it to stop the distance between the component will be less then 4".

Did i miss something? where can you just add a length parameter to the array? In a family i thought you could only parameter the interger, not a distance.

Justin

twiceroadsfool
2007-04-20, 10:59 PM
well i have an item that needs to array every 4" but if the length is not a multiple of 4 i want it to stop the distance between the component will be less then 4".

Did i miss something? where can you just add a length parameter to the array? In a family i thought you could only parameter the interger, not a distance.

Justin

You certainly can parameterize the distance. Make the array, and put a Label on the Count with a parameter. Then, put a dimension between the first and second object (use the same reference on each object... Out to out, CL to CL, etc.) Grab the dimension, and assign a length parameter to it. :)

twiceroadsfool
2007-04-21, 12:54 AM
Justin-

Heres the nasty thing about only having a demo version at home. I was thinking about what you were asking, and had a way to do it. So i put it together, but i couldnt save the family to upload because im on a demo version. (this is equally funny because my company laptop is in my car with a registered copy...) but anyway...

I got the array to do what you were questioning:

It takes a "desired distance" = "DISTANCEDESIRED"

It uses an over length = LENGTH. This could be in a standard family, or you could use "Length" in a line based family, my ideal solution for the OP.

I also put in an "Object Length" = OBJECTL. Whatever were putting in the array must have an object, and a space between. Since i dont know what specifically youre trying to do, i called the physical objects length "OBJECTL".

the array is pretty flexible. All the extra parameters are check values. They make sure the objects cannot overlap geometry (it lowers the count if it does, thats why there are so many parameters).

What i DID NOT include, is a check value to stop the family from collapsing if the array value = 0... IE, if the Length is equal to or shorter than the Object itself. Its doable (i posted one in my blog the other night), but not worth putting in here for no reason. Here is a screen shot of the parameters, since i couldnt save it. :)

Mr Spot
2007-04-23, 02:38 AM
This is quite easy to setup.

Use Array to 2nd element. Dimension between the first and second elements and add a parameter called spacing.

I've done a few line based array families where you simply drag out the line of elements and the appropriate number of items are added with a fixed spacing. If the length doesn't fit the number of elements perfectly based on the spacing a gap is left at the end and the last element is not inserted.

I'll see if i can find an example family and post it...

Mr Spot
2007-04-23, 02:40 AM
Here is an example. Hope it makes sense. Feel free to ask any questions.