@whit said:
I may be going about this all wrong, but I'm trying to make something very specific.
What I want is: to generate copies of a component which land in the model on the same plane as the original and equally spaced apart. I see how to do the stretch function, but I need individual copies, in AutoCad it is the array function. Can you point me in the right direction?
I think what you want is to add 'Position' attributes X and Y and define them based on the 'Copy' variable.
Attached is an example that creates columns and rows of a fixed size solar panel by scaling the frame that wraps around it. X and Y for each copy of the panel are defined as follows:
X=solar_array!frameThick+(rowXLenX)
Y=solar_array!frameThick+(rowYLenY)
'rowX' and 'rowY' are custom attributes of the panel, defined as follows (note use of 'Copy'):
rowX=FLOOR(Copy/solar_array!numY)
rowY=Copy-(rowX*solar_array!numY)
'numY' (and 'numX', which is not used here for positioning) are computed at the top level of the component hierarchy, along with the exact dimensions of the surrounding frame, based on the number of panels that will fit within the re-scaled frame (by dragging its edges):
LenX=CEILING((current("LenX")-(2frameThick))/sun_power305_single_crystalline!LenX)sun_power305_single_crystalline!LenX+(2frameThick)
LenY=CEILING((current("LenY")-(2frameThick))/sun_power305_single_crystalline!LenY)sun_power305_single_crystalline!LenY+(2frameThick)
And some code to make sure the minimum size contains one panel (not zero!).
I now frequently use DCs like this instead of move/copy; there are advantages.
Solar array will scale in two dimensions by replicating a single panel as needed.