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!
    ⚠️ Update | Sketchucation Tools 5.0.8 released with licensing improvements and bugfixes Download

    Open Component Options window with Ruby?

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 767 Views 3 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.
    • D
      descoteaux
      last edited by

      I'm trying to create a custom tool in Jim Foltz's Custom Toolbar. It simply needs to open the Component Options window when clicked. Unfortunately there doesn't seem to be a Sketchup.send_action value to do so. Is there an alternative way to accomplish this? Thank you.

      1 Reply Last reply
      Reply Quote 0
      • TIGT
        TIG Moderator
        last edited by

        See https://developers.google.com/sketchup/docs/ourdoc/sketchup#send_action
        Sketchup.send_action(21060) Sketchup.send_action(21086)
        PC only

        TIG

        1 Reply Last reply
        Reply Quote 0
        • D
          descoteaux
          last edited by

          Thank you for your help. I've actually already explored that list and I believe the Component Options window is not on it. Those send action values aren't it.

          1 Reply Last reply
          Reply Quote 0
          • Dan RathbunD
            Dan Rathbun
            last edited by

            ??

            id 21086 is assigned to the "Purge Unused" menuitem, on the Components Manager Popup menu.

            I'm not here much anymore.

            1 Reply Last reply
            Reply Quote 0
            • Dan RathbunD
              Dan Rathbun
              last edited by

              And...

              id 21060 opens the Components Manager Inspector (toolwindow,) NOT the DC Component Options (WebDialog) window.

              Instead call:
              $dc_observers.get_latest_class().show_configure_dialog()

              or to close it:
              $dc_observers.get_latest_class().close_configure_dialog()

              You will need to add a defined?($dc_observers) check (perhaps as part of the toolbar button validation proc,) to be sure that Dynamic Components are loaded, and perhaps a require("dynamiccomponents.rb") if they are not. (Still a user may have them turned off in the Preferences dialog.)

              I'm not here much anymore.

              1 Reply Last reply
              Reply Quote 0
              • D
                descoteaux
                last edited by

                Excellent! That did the trick Dan, thank you!

                1 Reply Last reply
                Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement