Hi Experts,
I am trying read SketchUp file’s geo locations via SketchUp APIs and I got several questions about SULocationRef, SUModelGetLocation and SULocationGetLatLong,
SUModelGetLocation will always return SU_ERROR_NONE (0) even the model wasn’t located. and the return latitude and longitude always consistent to a one of your office?
Can the toolkit return SU_ERROR_NULL_POINTER_OUTPUT for model has no geolocation?
SULocationRef object should I release it explicitly after using? If so what API should I use for releasing?
Hmm… it looks like the C API doesn’t support to query whether to use the geo location data in the model or not.
What you can do as a workaround meanwhile is manually inspecting the UseGeoReferencing attribute in the GeoReference dictionary on the model object to see if geo location should be used:
Thanks for checking.
Do you know how to get the UsesGeoReferencing via C API?
And when the issue should be fixed?
BTW I click the component attribute item in the Window menu, it prompt me to select a component to show the attributes, however I don’t know how to correctly select the component, single/double click on a the small cube in my uploaded file don’t show any attributes…
Read the attribute on the model from the “GeoReference” AttributeDictionary.
I’m unable to provide a fixed timeline for this, sorry. But we have the issue filed.
That window display attributes related to Dynamic Components only. Attributes in SketchUp are much more generic than that and have to UI out of the box.
Here’s the tool I use to inspect attributes visually: su_attributes.zip (2.8 KB)
@jody - can we get RBZ files as allowed filetypes in the forum?