Hi All
How to create a unique group of objects from multiple arrays?
This is an example of a known array of layers
layer1 = #("Sphere001","Sphere002","Sphere003")
layer2 = #("Box001","Box002","Box003")
layer3 = #("Tube001","Tube002","Tube003")
then I used the loop method like this with the results I wanted
ObjectGroup= #()
for i=1 to layer1.count do
(
for x=1 to layer2.count do
(
for y=1 to layer3.count do
(
groups = #(layer1[i], layer2[x], layer3[y])
ObjectGroup += #(groups)
)
)
)
format "Total Result: %\n" ObjectGroup.count
print ObjectGroup
which is a challenge and makes me stuck.
What if the array number of layers is not yet known and each layer has an unknown number of objects?
Can this be done using the recusive method? so how to make it?
By draging · 2023-12-12
Swordslayer · 2024-02-01