Dynamic components. How to copy in two directions

Hi, I am pretty new with DC, and I can’t figure out how I could copy a subcomponent in two directions. I copied my wheel of a dynamic cabinet in X axis, now I am trying to duplicate the original and the copy that I just created in Y axis.
I know, I could just copy it manually, but I am curious how to achieve that with functions.
Any advice is welcome.

You could check the formulas in the dynamic example components in the Warehouse. For instance, the ceiling example has an array of components in two directions.

1 Like

This may be helpful:

1 Like

Hello @Kornelija, I used your question as a practice exercise and came up with a way to do Y copies and spacing. @Anssi and @rwamoore provided good links to learn about DCs. I used the Picket Fence example along with their suggestions to help adjust spacing: Repeating a sub-component within a dynamic component (1 Dimension) | SketchUp Help

Here is the set up I used:

Spacer Child Component

This images shows 2 components, like your wheels, but with 0 spacing.

This is xSpacing set to 3 (3 spaces that are the same size as the component, between the two components).

X Spacing 3 Component Options

Here is ySpacing 0, with copies along the Y axis.

And here is ySpacing 5, which is rectangular like your cabinet.

Y Space 5

ySpace 5 set

I’m just learning to make Dynamic Components myself so it was interesting to see your question and try to solve it. I’m not sure (or doubt really!) that I’m using best practices but this solution does seem to work.

3 Likes

Thanks all of you for your tips and solutions! My apologies for delayed response, it went into the background for a while. I tried make it with ceiling function, but I got a little bit lost with custom spacing… After a couple hours of trying to make this work, I figured it out what I did wrong when I tried to achieve it with just a copy function. I tried to copy a wheel in X axis and in Y axis, but what I had to do instead was to copy a wheel in x axis, make a component of the the original and X axis copy, and then copy that component in Y axis.

1 Like

Congratulations. Well done.

Yes. Copies. Many copies:

You could probably add a Component Attribute in the Component Options Panel that changes the wheel rotation. That would be a nice feature for your cart.

It looks like this thread was marked as solved so better to start a new one…