Friday, December 1, 2023
Home3D ModelingMannequin data -> Geo-location data added by way of API doesn't present...

Mannequin data -> Geo-location data added by way of API doesn’t present “This mannequin is manually geo-located” – Ruby API


When modifying geo-location by way of the API Sketchup.active_model.shadow_info keys, the Mannequin Information → Geo-location panel doesn’t replace, and nonetheless reviews “This mannequin will not be geo-located” (1). If I click on “Set Handbook Location…” (2), the placement knowledge is proven, after which solely after clicking OK, the message “This mannequin is manually geo-located” (3) is displayed.

(1) Set geo-location knowledge by way of API, “This mannequin will not be geo-located” continues to be displayed.
image

(2) Click on “Set Handbook Location…”, the info is there
image

(3) Solely after manually clicking OK, the message “This mannequin is manually geo-located” is displayed
image

So the query: Is there a technique to efficient press the “OK” button by way of the API?
In any other case this isn’t nice UX and I’d contemplate it a bug.

Examined on SU2022 Mac, SU2023 Mac. Does it behave the identical on Home windows?


There’s a related conduct report about C-API SUModelSetGeoReference():

So, I suppose it’s related in your case in Ruby API. (?)

There was one other current report right here (Feb final) on the Ruby API. I posted some ideas there.

Both @JeffR or your self ought to open an API difficulty particularly for the Ruby API within the GitHub tracker.

I didn’t discover a repair for this. How will we report it as a bug?

Be sure you’re signed into GitHub, then go to this web page:

I checked out that attribute dictionary talked about by @JeffR, and calling

mannequin.set_attribute("GeoReference", "UsesGeoReferencing", true)
DOES appear to trigger the message to change to “This mannequin is manually geo-located”!

Moreover, when the UI is reporting “This mannequin will not be manually geo-located”
mannequin.get_attribute("GeoReference", "UsesGeoReferencing") returns false

then clicking “Set guide location…”, and “OK” with out modifying the info,
mannequin.get_attribute("GeoReference", "UsesGeoReferencing") now returns true

This was typing on the console, I haven’t tried it within the working extension but.

That appears moderately loopy that the SketchUp UI is displaying the geo-location standing based mostly on the worth of an attribute like that (and never an inside setting within the file). As famous by others, this attribute dictionary is an undocumented API which is a hangover from the Google days, that might be totally deprecated in some unspecified time in the future, so i wouldn’t actually be a strong answer to make use of that, however possibly it would suffice as a workaround for now.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments