• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Using hide in DC's?

Scheduled Pinned Locked Moved Dynamic Components
sketchup
5 Posts 2 Posters 1.1k Views 2 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.
  • R Offline
    rabbit
    last edited by 15 Dec 2009, 00:14

    Could someone help with the following?

    Say i have a component that is a torch and its light beam. I would like this to be a dynamic component that:

    a: changes the colour of the beam when the beam is clicked interactively (which I have managed to do)
    b: turns on and off (ie a toggle that hides/unhides) the beam when the torch is clicked interactively.

    Shouldn't be too hard, but I can't get it to work...!

    thanks

    rabbit

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 15 Dec 2009, 06:48

      You have to give the beam component a hidden attribute and point it back to a onclick in the torch component. The onclick should be toggling between 1 and 0 (or is true and false....). If you still can't get it, upload what you have so far.

      Chris

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

      1 Reply Last reply Reply Quote 0
      • C Offline
        Chris Fullmer
        last edited by 15 Dec 2009, 07:04

        Well, I went ahead made a quick mock-up of what you're after. Just the on and off part, not the colors since you said you got that working.

        Chris


        torch.skp

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

        1 Reply Last reply Reply Quote 0
        • R Offline
          rabbit
          last edited by 15 Dec 2009, 21:29

          Chris - thanks, thats perfect!
          I note you have a custom attribute "on_click_hider" - but this appears to do nothing ie the thing works without it. Is this something you left in when you were experimenting with it?

          There really needs to be some better documentation on these things...especially for people who are not coders.
          How did you learn to do this...?

          cheers
          rabbit

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chris Fullmer
            last edited by 15 Dec 2009, 22:01

            Yes, that custom attribute is left over from me trying to rememeber how to get it to work.

            As for figuring out DC's - it was a painful experience. I recall lots of nagging the development team for better docs. They have a pretty good website now that puts together the possible methods and examples of each method in action. In the Component Attributes window, just click on the functions tab. Then look for the little "more" url link. It brings up this page:

            Error 404 (Not Found)!!1

            favicon

            (sketchup.google.com)

            And I recommend starting just like you are. Play around with onclicks and hidden variables, then move on to rotation and moving and copies, etc. And good luck!

            Chris

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

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

            Advertisement