Bulk convert sketchup files from one version to another

EDIT: extension to convert all your sketchup models from version 3 all the way back and forth to 2019 is live: Extension | SketchUp Extension Warehouse
Available for both windows and mac.

For a project I was working on (SketchUp extension, what else :slight_smile: ) I needed to convert some 100+ .skp files from version 2019 back to 2017. The extension contains a library of files and we were willing to support back to SketchUp 2017.

First I created a ruby script that just iterates the files, opens them one by one and saves them in the needed version. But, I wanted to speed things up and use the C sdk, so that I could do the version conversion ‘headless’.

That worked out great for the project and the files were converted in a few seconds. Of course, it took more time to develop the app, but now I have something ready in case we need to support an older version, or, by mistake save out the files in SketchUp 2019 without specifying the correct (older) version. In fact, I thought this might be useful for others that have a bunch of files, don’t know the correct version they are all in, and want to update them to a specific version all at once. For those, I have a sneak peak to show the current progress of such an app:

The tool currently works on both windows and mac, and, since it depends on the sdk instead of the installed sketchup version there is a bonus that the tool can convert newer versions than the version of sketchup installed. I was thinking of making it a separate tool (thus, not a sketchup extension), but, I think it is convienient to have such a tool available in extension warehouse, and acessible from sketchup since the direct relation to sketchup. But, if ever someone needs this kind of functionality even without sketchup installed, feel free to message me.

For now, I was just wondering if there is some interest and maybe someone willing to test?

2 Likes

It obviously ‘kanalot’ !

1 Like

I am always open for some re-branding initiated by a group of resellers :wink:

1 Like
  • Kanalot!
  • Kanalot!
  • Kanalot!
  • …it’s only a model…

(https://www.youtube.com/watch?v=SQCArh_R9dY)

3 Likes

Thank you to the SketchUp team for approving the first public release.

https://extensions.sketchup.com/extension/88c99670-399d-40f9-ba36-e860a492efc5/kg-dev-bulk-alot-sketch-up-skp-version-convert

1 Like

There are some technical difficulties on osx it seems.
The extension contains a separate executable. After placing the extension on the warehouse and installing that version I have a permission denied on that executable on osx. Copying in the original from my dev machine executes just fine. When I take a look at the permissions, the original one deriving from my dev machine has rwx permissions, while the one included in the extension only rw.

How to make sure on osx that those included executables have rwx permissions? Any mac developers that could help? @john_drivenupthewall for example?

EDIT:
if I install the original .rbz that got uploaded to the extension warehouse (thus, yet nonencrypted) through extension manager, the tool works fine. If I then install the version from Extension Warehouse, it doesn’t.
If I encrypt the .rbz using the extension sign tool and install that signed .rbz, it doesn’t work either.

If I then chmod the executable to 755, it works again of course.

Or, maybe someone from the extensibility team could help on this one? @tt_su

EDIT: chmod on the executable before executing seems to fix it for encrypted extensions.

I just chmod on the first run…

    File.chmod(0755, icon_bin) unless File.executable?(icon_bin)

john

1 Like

Thank you. I already changed to code to chmod always and uploaded that to the warehouse. But, I will alter it to the line you suggest and make sure that will be used in a next release.

to clarify…

I have the code in the extensions logic file so it gets called locally, first run, on the end users mac…

it ‘currently’ seems to be enough to counteract the xatrib flag ‘downloaded from the internet’ that gets added for ‘Finder’…

john

1 Like

Thank you for your insight

1 Like

Hm… maybe RBZ re-packaging is changing file access…?

Edit: hmm… that’s still strange, because regardless of the extension being encrypted, there are extension_info.txt files added… Will have to talk with the EW team.

1 Like