Open Component Options window with Ruby?
-
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.
-
See https://developers.google.com/sketchup/docs/ourdoc/sketchup#send_action
Sketchup.send_action(21060) Sketchup.send_action(21086)
PC only -
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.
-
??
id 21086 is assigned to the "Purge Unused" menuitem, on the Components Manager Popup menu.
-
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 arequire("dynamiccomponents.rb")if they are not. (Still a user may have them turned off in the Preferences dialog.) -
Excellent! That did the trick Dan, thank you!
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 LoginAdvertisement