I had a Ruby application back around 2008-2012. It used the code below to set the model GeoReference. When I use the same code now (in SketchUp 2021 and 2022), it does not seem to work. The printf line at the end prints out the latitude and longitude I intended to set, but when I look at the “Geo-Location” tab in the “Model Info” window, it says “this model is not geo-located”
Is there something else I need to do? Here is the code:
Just a thought interjected here. The “GeoReference” attribute dictionary (I think) was originally designed to be populated by the built-in Google Earth location service. (This would populate the X, Y, and Z attributes in inches from the geographic datum.)
When Google sold SketchUp to Trimble the latter was given a certain amount of time to wean off of using Google Earth. The built-in location feature now uses other non-Google services. (I am unsure if they even use this old dictionary.)
The change you’ve noticed (circa SU2021 release) might coincide with the full weaning from Google Earth.
Besides (or perhaps instead of) setting the values in the “GeoReference” attribute dictionary, I think you likely need to set some values in the model’s ShadowInfo object.
EDIT: I see you did set longitude, latitude and north angle in shadow info.