API to Open Model Info Dialog?
-
Hello everyone, it's been a while. I like the site redesign!
I am wondering if there is a hook in the API to open the native Model Info dialog box, ideally with the geolocation page selected. My goal is to have a button on a toolbar that opens the geolocation page.
Is this possible? Thanks.
-
there already is a geo-location icon..
it's at the bottom-left corner of the drawing window.
-
@draftomatic said:
I am wondering if there is a hook in the API to open the native Model Info dialog box, ...
Yes ... UI::show_model_info("Geo-location")
@draftomatic said:
... ideally with the geolocation page selected.
I believe the API panel arguments are still bugged on the Mac, but work on PC.
@draftomatic said:
My goal is to have a button on a toolbar that opens the geolocation page.
As Jeff said there is a built-in button (brown circle with a light bulb inside it. At least it looks like a light bulb to me.)
If you wish to open the "Add Location ..." map dialog (the same as clicking the first button on the Google toolbar.):
Sketchup::send_action('getCurrentView:')
-
You might be interested in this code:
-
Thanks Dan, exactly what I needed.
Advertisement