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

    Open Component Options window with Ruby?

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 467 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 Offline
      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 Offline
        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 Offline
          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 Offline
            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 Offline
              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 Offline
                descoteaux
                last edited by

                Excellent! That did the trick Dan, thank you!

                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