# Automating the removal of geolocation from a model

**URL:** <https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743>\
**Category:** Pro\
**Tags:** geolocation\
**Created:** [November 21, 2018, 4:14pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743 "2018-11-21T16:14:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhannah](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dhannah](https://forums.sketchup.com/u/dhannah)\
**Post date:** [November 21, 2018, 4:14pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/1 "2018-11-21T16:14:44Z")

</div>

My company has a huge library of component models that we use in our drawings. I am slowly but surely working through improvements in their use, and the next step in doing that is removing the geolocation from each model to prevent them from snapping to origin when importing.

To do this manually takes about 30-45 seconds per model, and I’ve got about 600 models to update. Is there a way to batch this?

---

<div class="post-metadata">

**Author:** ![Aerilius](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@Aerilius](https://forums.sketchup.com/u/Aerilius)\
**Post date:** [November 21, 2018, 4:29pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/2 "2018-11-21T16:29:40Z")

</div>

Automating usually means “scripting”, because you need to instruct the computer precisely what to do (and click targets would not be unambiguous enough).

So this is a question about using the SketchUp Ruby API. To achieve this, you need to:

- choose model files (best by [selecting a folder](http://ruby.sketchup.com/UI.html#select_directory-class_method))
- [iterate over model files](https://ruby-doc.org/core-2.2.4/Dir.html#method-c-entries) and [load](http://ruby.sketchup.com/Sketchup.html#open_file-class_method) them in SketchUp
- [delete the model attribute dictionary](http://ruby.sketchup.com/Sketchup/AttributeDictionaries.html#delete-instance_method) `GeoReference` on the `Sketchup::Model` object
- [save](http://ruby.sketchup.com/Sketchup/Model.html#save-instance_method) the model file

But did you think about the danger of automating away people’s jobs?

---

<div class="post-metadata">

**Author:** ![dhannah](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dhannah](https://forums.sketchup.com/u/dhannah)\
**Post date:** [November 21, 2018, 4:31pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/3 "2018-11-21T16:31:59Z")

</div>

I for one welcome our new robot overlords!

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [November 21, 2018, 4:42pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/4 "2018-11-21T16:42:09Z")

</div>

I believe the model’s [**`ShadowInfo`**](http://ruby.sketchup.com/Sketchup/ShadowInfo.html) data object has a few fields that also need to be cleared.

- City
- Country
- Latitude
- Longitude
- TZOffset
- North Angle

---

<div class="post-metadata">

**Author:** ![NickyC](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@NickyC](https://forums.sketchup.com/u/NickyC)\
**Post date:** [July 11, 2025, 2:15am UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/5 "2025-07-11T02:15:13Z")

</div>

@dhannah , I wondered if you ever found a script for automating the removing of geolocation from multiple components?  
I’d really love to give my entire components library a geolocation scrub!  
Like you, I’d prefer not to have to individually open up 100’s of components and remove geolocation from each.

(Is there a feature request anywhere for an option to import components without geolocation, or even “save out” without geolocation?  
I work on models geolocated on opposite sides of the globe, and reusing components I’ve made in a different geography can be a massive headache - bringing SU to a standstill - have to force closure and start again everytime)

---

<div class="post-metadata">

**Author:** ![JackyM](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@JackyM](https://forums.sketchup.com/u/JackyM)\
**Post date:** [August 29, 2025, 3:57pm UTC](https://forums.sketchup.com/t/automating-the-removal-of-geolocation-from-a-model/81743/6 "2025-08-29T15:57:56Z")

</div>

Closed on August 29, 2025, 3:57pm UTC


