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

    Using Variables of parent DCs

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    16 Posts 5 Posters 3.3k Views 5 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.
    • plot-parisP Offline
      plot-paris
      last edited by

      aaaah. I looked at it the wrong way around.
      so the way to go is actually animating the variable as opposed to the variable triggering the animation... thank you very much Jim. 😍

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

        I think it is a good, generalized solution to use in many circumstances.

        I'm glad I could help. πŸ‘

        Hi

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          Watch out Jakob, once you start playing with DC's you quickly see how much more you could want to do with them. And then its a natural step to start Ruby after that.

          DC's are what got me to finally try to learn ruby, and I started learning DC's just one year and 2 weeks ago. Its a slippery slope into the world of ruby πŸ˜„

          Chris

          Lately you've been tan, suspicious for the winter.
          All my Plugins I've written

          1 Reply Last reply Reply Quote 0
          • plot-parisP Offline
            plot-paris
            last edited by

            are you serious? you started with ruby only a year ago??? 😲
            and now you are one of the most active writers out there, having produced many invaluable scripts...
            wow. either you are smart as hell or ruby is truly easy - or both πŸ˜„

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              I needed some extra credits to graduate, so I designed an independent study class to learn ruby. So I touched ruby for the first time in January of this year. So its not even been a year yet. I had written shape bender which is my most complex plugin by the beginning of March. While I'd like to think it's my brains, I'd have to give most of the credit to Ruby's easy to learn syntax. This is the only programming language I know at this point, and I only learned it for SketchUp. And I have no real math training. And it really was learning DC's that showed me that I could learn the syntax and that I had a lot of ideas that could not be implemented in DC's, so it pushed me into ruby. So we'll be expecting you to show up in the developer's section soon πŸ˜„

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • plot-parisP Offline
                plot-paris
                last edited by

                @chris fullmer said:

                So we'll be expecting you to show up in the developer's section soon πŸ˜„Chris

                uff, the pressure! πŸ˜•
                well, who knows, maybe I will find that Ruby actually is what I've been looking for my whole life. always so many ideas in my head and no means to get them out of there... after your pep-talk I actually feel like getting started... πŸ˜„
                but first things first. DCs still keep a lot of secrets from me that want to be discovered...

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  @unknownuser said:

                  well, who knows, maybe I will find that Ruby actually is what I've been looking for my whole life.

                  Do it! πŸ˜„

                  Thomas Thomassen β€” SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • plot-parisP Offline
                    plot-paris
                    last edited by

                    I've just got another question.
                    now I know that I can get a parent component's value to a subcomponent by using 'ParentComponent**!**Variable'.
                    but is there a way to transfer the value of a subcomponent to a different subcomponent? didn't seem to be working for me...

                    1 Reply Last reply Reply Quote 0
                    • Chris FullmerC Offline
                      Chris Fullmer
                      last edited by

                      You can go child to parent, parent to child, and sibling to sibling. But not grandparent to grandchild - that just sounds silly. But you can't skip over any connection. So if you have a variable and want to pass it down from the top groupd, down to a sub sub sub component, you have to pass it through each sub component along the way. It gets messsy unfortunately.

                      But you should be able to go from one component to another if they are on the level.

                      Chris

                      Lately you've been tan, suspicious for the winter.
                      All my Plugins I've written

                      1 Reply Last reply Reply Quote 0
                      • plot-parisP Offline
                        plot-paris
                        last edited by

                        unfortunately that doesn't seem to be working for me.
                        imagine the following situation: you have got a 'onClick' function assigned to a subcomponent. the function animates a Variable. and now I want this variable to multiply the length of another subcomponent (or even the daughter of another subcomponent).
                        somehow I don't seem to get this to work...

                        [Edit] I just checked again. the value of the subcomponent's variable isn't passed on to the parent component. neither does it reach another subcomponent. to me it seems values can only be passed down the chain, but not up.
                        unless you have to use a different way of referencing it, than 'subcomponent!variable'...

                        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