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!
Advertisement