sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Letter A with onClick material colours

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    4 Posts 2 Posters 7.0k 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.
    • SJS66S Offline
      SJS66
      last edited by

      What would be the best way to make a sub-component (A_Letter) that changes it's colour from Black to Red while it it is inside a main component (A_Card) with onClick attributes? So you onClick on the A_Card component and the A_Letter subcomponent changes colour. I have included two colour swatches on the back of the A_Card so "Black_L" & "Red_L" materials are in model.

      I've attached a SU 2017 model for anyone to play with if they could be bothered. Otherwise instructions, a link or eg. file would suffice.

      I'm sure it is relatively simple, starting to think the same about me. πŸ˜›


      DynamicLetterA_SU17_SkU.skp

      1 Reply Last reply Reply Quote 0
      • P Offline
        pcmoor
        last edited by

        card trick.skp

        I choose generic red and black, rather than add a pallet, use SET("attribute",state1,state2,...stateN) for onClick in parent and reference the child material, named colors have to be text.

        http://ruby.sketchup.com/Sketchup/Color.html
        lists the standard colors that DCs (ruby) interprets

        P.S.
        I removed your existing materials replaced with default

        1 Reply Last reply Reply Quote 0
        • SJS66S Offline
          SJS66
          last edited by

          Thanks again pcmoor, nice "card trick":-)

          What I can't figure out is why you need the Custom "f" attribute in the child component attributes? How does that work when it has no values & is not referenced by the parent component attributes?

          1 Reply Last reply Reply Quote 0
          • P Offline
            pcmoor
            last edited by

            a bit of junk, sorry can be deleted, can't recall why I started it.....sign of age?

            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