Sub-component to copy equidistant along main component
-
Just wondering if anyone can help me with a dc formula to get a sub-component to copy equidistant along a main component if the main component is resized or scaled.
I've attached a model of a cabinet door which has a backing frame that I would like the door rail to copy equidistant up along the door stiles or height if the door height is changed. I just can't get the copy equidistant to the length of the door stile or overall height part of the component to work. I just can't seem to get the copy and/or PosZ formulas to work. Any help much appreciated.
-
hi
when using copies, the DC creates a number of copies each with a notation copy which is sequential.
So if there are four copies, then copies will be produced with an attribute called Copy with a value 1...up to 4one uses this copy attribute to identify and manipulate each copy
the first idea is generally create equal sized copies and have them space themselves evenly. Assuming the first copy is the top rail, then its location would be the height of the door minus the width of the rail
=DoorPanel!LenZ-LenZ
if I times this by copy
=copy*(DoorPanel!LenZ-LenZ)then if copy=0, this expression =0, which is true for the original.
if copy =1, the expresion = DoorPanel!LenZ-LenZ. the position of the top railnow I introduced a attribute option for the number of rails (including the first)
now copies of DoorRail will be =DoorPanel!number_rails-1
now their position will be divided by one less than the number of posts as per a fence construction, that is the same as the copies value
so for the position
=copy*(DoorPanel!LenZ-LenZ)/Copieshence the solution as attached
one could add conditional statements as well to create variances via optional input for intermediate mullions, or different panel sizes, will help if you require and you explain any detailing
-
this is a slight modification where one can choose the maximum rail position
-
That is exactly what I was trying to do.
Your now on the "Legend" list.
Thanks mate.
Advertisement