I’ve used this formula more times than I can count:
https://help.sketchup.com/en/article/114548 (Repeating a sub-component within a Dynamic Component (2 Dimensions)
I’ve looked and looked, but couldn’t find any 3-direction arrays, so I came up with one. Same basic premise with an added level.
Here’s how I organize:
xSpa(cing) - distance between columns across
ySpa(cing) - distance between rows front-to-back
zSpa(cing) - distance between rows bottom-to-top
X: (Position of source component) + COPY * xSpa
Y: (Position of source component) + COPY * ySpa
Z: (Position of source component) + COPY * zSpa
xDiv(ider) - # of columns across
yDiv(ider) - # of rows front-to-back
zDiv(ider) - # of rows botton-to-top
Copies: xdiv * ydiv * zdiv-1
myCol(umn): =COPY - myDep * xDiv * zDiv - myRow * xDiv
myDep(th): =FLOOR (COPY / (xDiv * zDiv))
myRow: =FLOOR ((COPY - (myDep * xDiv * zDiv) +.1) / xDiv)
See what you can do with it!
BT
Edit: made my variables consistent and kept my * from disappearing with the html formatting