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

    Using Materials dynamically

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 2 Posters 1.2k 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.
    • C Offline
      CaptLogic
      last edited by

      Hello,

      I'm trying to create a dynamic component that mimics the functionality of the 'Art Frame' dynamic component that Google created. Basically it is a dynamic component of a frame picture. Each time you click on the frame the 'artwork' material changes.

      If I understand correctly, this behavior comes from the components 'onClick' behavior that is currently: SET("ArtCount",1,2,3,4)

      To me this says, rotate the material between 4 different options.

      What I cannot figure out is how to create this to begin with. I see a 'Custom' section in the components attributes section that has a 'ArtCount' property that is set to '4'. What I don't understand is how to designate each material. Is it a hidden face that has a tag that identifies it as item #1 or 2 and is unhidden in response to a 'dynamic click'?

      I'm happy to absorb a video or other tutorial, I just can't seem to find what I'm looking for.

      Thanks so much.

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

        It's not a hidden face exactly - there are 4 sub-components which are being made visible/hidden depending on the value of the ArtCount attribute.

        The onClick is just cycling the value of the ArtCount attribute through 1 - 4. Nothing more to the onClick than that.

        Then each of the 4 Components which contain the images looks at the value of ArtCount to decide to be hidden or visible. These 4 components use the built-in HIDDEN attribute to decide to be hidden or visible.

        "Mona" Component:

        Hidden: =IF(ROUND(PictureFrame!ArtCount)=1,FALSE(),TRUE())

        means if ArtCount equals 1, then Hidden is FALSE, and Mona is visible.

        Hi

        1 Reply Last reply Reply Quote 0
        • C Offline
          CaptLogic
          last edited by

          Awesome,

          Thanks for your help.

          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