Number of copies and distances established from another DC
-
Hi friends.
I have a DC called "cube", which I want to control by another DC called "data_entered_by_user".
The "cube" must be copied as many times as the user enters in "data_entered_by_user". And the copies must be positioned on the Y axis, according to the distances set by the user in "data_entered_by_user".
I thought the "CONCATENATE" function would do it, but it doesn't work. Is there any way to achieve this?
-
A guess form information posted:
have 3 attributes pick up distancey1 to 3, say dy1..dy3, then use choose(smallest(round(copy+1),4),0,dy1,dy2,dy3)
the smallest keeps it within the choose criteriait maybe best to upload your project
-
@pcmoor said:
A guess form information posted:
have 3 attributes pick up distancey1 to 3, say dy1..dy3, then use choose(smallest(round(copy+1),4),0,dy1,dy2,dy3)
the smallest keeps it within the choose criteriait maybe best to upload your project
@pcmoor, thank you very much for your help and for your time.
I'm a newbie, and I learned a lot about the "CHOOSE" function from your example. The result is close to what I want, however, I wonder: What happens when I want to increase the number of copies from the DC controller (and also their positions on the Y axis)?
Is this possible with DC or should I learn ruby?
Once again, I thank you very much for helping me.
-
Yes definitely learn Ruby
Currently Dynamic Components are the best and "native" way of placing data and having some control over objects, whether "Live Components" are able to compete or excel will be years away.
So stick with Dynamic Components and learn how they can be controlled and improved on using Ruby.For example the "redraw all" script kindly donated by Dan
https://forums.sketchup.com/t/redraw-all-dynamic-components/77512/10 might help, or placing a redraw onclick in the cube
However a clear picture of what you trying to achieve may help me to advise the best method.
array copies are generally y = copy*(leny+space)
Advertisement