Help with dynamic component (:
-
Hello to all the dynamic people out there
I need a little dynamic component. I have searched the topic of dynamic components but I haven't been successful in creating what I need :S
I hope someone here will help me out. The thing is that I'm unsure if this is too complicated to ask for here. But it would be great if someone has the skills and time to assist me
I need to be able to define the thickness of the material used, currently 8cm+8cm it could be set to 4x4 or similar, it will always be perfectly square.
the same goes for the cube in total, it's currently 120cmx120cmx120cm I need to be able to change this too, to e.g. 100x100x100 and so onThe cube needs to contain the exact parts as in the file.
Thanks in advance!
-
Here is a solution :
Cube_DD.skp
All is cubic, and so there are two values : thickness and size -
Thank you very very much Daredevil it works perfectly
-
i was trying this and got stuck… (well, not stuck but if i were to continue any further with the approach, my formulas were going to get very long)
i was trying it using only two components.. a single cube and a single rail..
%(#FF0000)[the problem i encountered was this.. i couldn't find a formula that let's me say something like:
if the copy equals 0,1,4,5 then (do something to it)
does that exist in dynamic components?]
here's where my stopping point is:the corners are all working properly but you'll see PosZ starts getting a little long winded because i had to pinpoint each individual corner in nested IFs..
doing that with the rails would get even longer because there are 12 of them..
i was using this for reference of my copies…
but yeah, i see daredevil already has a working solution which i'll analyze after this post.. but my question is the stuff in red above.
thanks -
@unknownuser said:
if the copy equals 0,1,4,5 then (do something to it)
Maybe the CHOOSE function coud be used to select a value based on the value of COPY? So instead of using "index" in the following example, use "COPY"
@unknownuser said:
CHOOSE(index,value1,value2, ...valueN)
The CHOOSE function returns a value from a list of parameters at the location of the index value. This function allows you to create a single drop-down list that drives multiple attribute changes at once.Example:
=CHOOSE(2,"Blue","Red","Green")
The previous example results in "Red."
And I think this could possibly be done using one component, although using 2 simplifies things.
-
@jim said:
Maybe the CHOOSE function coud be used to select a value based on the value of COPY? So instead of using "index" in the following example, use "COPY"
hmm.. i was able to get that to work although it shows an error in the attributes [0 is out of range] (and i'm not sure what '0' it's referring to.. maybe copy #0 ?
@unknownuser said:
And I think this could possibly be done using one component, although using 2 simplifies things.
yeah.. i think you're right
-
@jim said:
Maybe the CHOOSE function coud be used to select a value based on the value of COPY? So instead of using "index" in the following example, use "COPY"
Yes ! good idea !!
It's OK with only two components and not so long formula :Cube_DD1.skp@unknownuser said:
hmm.. i was able to get that to work although it shows an error in the attributes [0 is out of range] (and i'm not sure what '0' it's referring to.. maybe copy #0 ?
yes, the first choose it's number "1", so must be "COPY+1" to work.
-
@unknownuser said:
Yes ! good idea !!
It's OK with only two components and not so long formula :[attachment=0:175kwns3]<!-- ia0 -->Cube_DD1.skp<!-- ia0 -->[/attachment:175kwns3].NICE!
Advertisement