sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Help with dynamic component (:

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    8 Posts 4 Posters 595 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N Offline
      nickdk
      last edited by

      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 on

      The cube needs to contain the exact parts as in the file.

      Thanks in advance! 😄


      cube.skp

      1 Reply Last reply Reply Quote 0
      • DareDevilD Offline
        DareDevil
        last edited by

        Here is a solution :

        Cube.jpg
        Cube_DD.skp
        All is cubic, and so there are two values : thickness and size

        1 Reply Last reply Reply Quote 0
        • N Offline
          nickdk
          last edited by

          Thank you very very much Daredevil 😄 it works perfectly

          1 Reply Last reply Reply Quote 0
          • jeff hammondJ Offline
            jeff hammond
            last edited by

            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:

            DC_cube.skp

            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…
            cube.jpg

            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

            dotdotdot

            1 Reply Last reply Reply Quote 0
            • J Offline
              Jim
              last edited by

              @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.

              Hi

              1 Reply Last reply Reply Quote 0
              • jeff hammondJ Offline
                jeff hammond
                last edited by

                @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 😉

                dotdotdot

                1 Reply Last reply Reply Quote 0
                • DareDevilD Offline
                  DareDevil
                  last edited by

                  @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.

                  1 Reply Last reply Reply Quote 0
                  • jeff hammondJ Offline
                    jeff hammond
                    last edited by

                    @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!

                    dotdotdot

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      Last post
                    Buy SketchPlus
                    Buy SUbD
                    Buy WrapR
                    Buy eBook
                    Buy Modelur
                    Buy Vertex Tools
                    Buy SketchCuisine
                    Buy FormFonts

                    Advertisement