number of copies and distances established from another DC

number of copies and distances established from another DC

Postby ReynaldoECG » Sun Aug 29, 2021 1:22 am

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?
0

ReynaldoECG 
 

Re: number of copies and distances established from another

Postby pcmoor » Sun Aug 29, 2021 2:19 am

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 criteria


it maybe best to upload your project
0

pcmoor 
 

Re: number of copies and distances established from another

Postby ReynaldoECG » Sun Aug 29, 2021 6:12 am

pcmoor wrote: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 criteria


it 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.
0

ReynaldoECG 
 

Re: number of copies and distances established from another

Postby pcmoor » Sun Aug 29, 2021 7:14 am

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-al ... s/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)
1

pcmoor 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Dynamic Components

cron

Who is online

Users browsing this forum: No registered users and 2 guests