Dezmo Save to older SketchUp Version

This Extension specifically made for SketchUp 2024.0. to allow to save to older SketchUp version.
However should work in any older SketchUp.
Tested only on Windows 11, at SketchUp 2024.0 (shortly in SketchUp 2023.1, SU2017 make)

Due to the massive bug in SU204 related to my special dual (“one and half”) screen laptop, the test was even less intense than the usual “Does not really tested” method. :blush:
Also because of this no animation recorded.
(I really suffer when I have to use SU2024… most of you shouldn’t have this problem, I’m a “special case…”)

No warranties! Use at your own risk!
Here is the non signed plugin, install with Extension Manager:

Dezmo_save_to_older_skp.rbz (40.5 KB) ‘RC0 2024_04_06_1354’
Edit: An error message appeared on the Mac while loading. This does not affect the operation, but here is a fix to prevent this message. I can’t test it on Mac… but I hope it will be okay. Restart Sketchup after installing the new version. ‘RC0 2024_04_07_1004’
Dezmo_save_to_older_skp1.rbz (40.5 KB)

You will get A menu at File>Save to older SketchUp Version with 4 (5) submenu as well as a toolbar.
You can assig shortcut to all. (You need to have a saved model opened to do so.)

Hovering over your mouse on menus/toolbar icons you will get some more information by the tooltip or the by Status bar text.

  • Save A Copy As version…(Select)
    You will be prompted to select the version of Sketchup you wan to save to the file. (The default value is “v_6”, however after you select other one that will be a default/preselected, even you restart the program.)
    Then the Save dialog box will display, where you can select the folder to save and modify the file name if desired. Basically the file name will be the model_name{-v_xxxx}.skp according to the current file name and a previously selected version. You can see the version in a title of this dialog too.

  • Save A Copy As version:
    This will quickly - without any dialog - save a copy of your current model as a previously selected default version, beside the current model - to that folder where the current model located.
    The file name will be as mentioned above. You can see the version and the full path of the file in a tooltip and the status bar when hovering on a menu/toolbar.

  • Save actual model as version…(Select)
    Similar dialogs as the first one, but this will save the actual model as the desired older version. Does not make a copy, and does not add any suffix at the end of the file. This is the model on which you currently working on.

  • Save actual model as version:
    Again a quick - no dialog - save of the actual file as a previously selected version, but no suffix added, keeps the original name of the file.
    You can see the version and the full path of the file in a tooltip and the status bar when hovering on a menu/toolbar.

Tip:
I coloured the last two icon as red, because I recommend to use the native V2024 format and just save an older version as a copy. (First two menu.)

Additional warning:
My extension still uses SketchUp’s built-in save as function. So saving to an older version will be as good as SketchUp allows. Maybe it will be as good as it was in older versions, maybe the file saved in the older version causes unexpected behaviour. I have no influence on this. Read the SketchUp End of Support Policy article and understand for yourself.

14 Likes

tested on mac os Ventura (and soon sonoma), SU24
real nice bit ! :slight_smile:

for the mac users looking for it, it’s not with the regular save choices, it’s at the bottom.
(in case anyone is looking for it)

3 Likes

Thank you so much!!!
Will be testing it shortly with Sonoma.
Bravo!!!

1 Like

Awesome, huge thank you! You’ve made F-35 out of it :slight_smile:

1 Like

I’m sorry to report that, for me, it’s not working in Sonoma.

Works for me in Monterey v12.7.4.

Many thanks, @dezmo.

2 Likes

It is a wonderful and useful tool for everyone.
It has nothing to do with piracy or cracking.
It is a tool that was and should still be built into the software.

4 Likes

This is weird. Do you get some kind of error message (if the Ruby Console is open), or it doesn’t save, or not into the selected version…?

Have you enabled Unrestricted in Extension Manager?

1 Like

Nothing. No warnings, no errors, no options in Menu/File… it…

WHOA NELLY, SLOW DOWN HORSEY! I just restarted and “LOOK” IT’S THERE!!!
Bizarre.
Thanks for the patience. What do you know?!.. it’s THERE now! I swear… it wasn’t there after two start ups. UGH.

Tomorrow, when I make my weekly SketchUp Facebook and Linkedin group posts, I’ll be sharing this with members. Dezmo, you have just solved a huge problem for many users that will become aware of it and I’m glad that you provided a solution for both mac and PC. My hat’s off to you! Bravo!

1 Like

I may have spoken too soon. I see the following Error in the Ruby console after using your extension.

I’m using Mac Monterey 12.7.4 and the just-released SU 2024 on an 8+ year old iMac 27" Retina computer with an Intel i5 chip. Monterey is the latest OS the hardware will run.

Error: #<NoMethodError: undefined methodpath’ for nil:NilClass>
/Users/JohnWMcC/Library/Application Support/SketchUp 2024/SketchUp/Plugins/Dezmo_save_to_older_skp/main_save_to_older_skp.rb:16:in m_path' /Users/JohnWMcC/Library/Application Support/SketchUp 2024/SketchUp/Plugins/Dezmo_save_to_older_skp/main_save_to_older_skp.rb:81:in block in module:SaveAndCopyAsSKPVersion
`
But it seems to have created and named a file with v_2017 following it, a file which I can open in SU 2017.

PS. The error only appears on startup of SU2024. Once it’s running, after I clear the Ruby console, I don’t get any more error messages when saving using the extension.

2 Likes

This indicates that there is no valid model object at the time that the #path method call is first made.

On the Mac, code should test the result of Sketchup.active_model before calling methods on the result.

1 Like

So no immediate cause for concern, but perhaps @dezmo might make a small update to remove the startup error?

1 Like

Thanks John,
I updated the first post with new version. Please restart Sketchup (whatever it means in Mac :wink: ) after installing it.

It is possible on Mac that the first validation process for the command in the code “happening” earlier than the model is “created” or get a focus…
As @DanRathbun pointed out, I have “bridged” it the if the model is missing…

(BTW: It is irrelevant from the point of view of the error, but according to the doc: Return of Sketchup.active_model should be the a active model object if successful, false if unsuccessful … but according to your report it is: nil if unsuccessful )

Edit

Edit: I just see other reported issue with a similar origin…
macOS - detect Sketchup.active_model == nil · Issue #954 · SketchUp/api-issue-tracker · GitHub

2 Likes

Done that, and it has fixed the load error. (restart means just the same on Mac as it does on Windows. Close SU, and reopen it.)

When I first use Save as older version choosing the first option…

… I expected (perhaps wrongly) that the extension would just use the file name with the suffix -v_2017 (or whatever version I was to choose).

But it waits for me to type a file name. If that is by design, fine.

Could it at least offer the existing file name as a default instead of blank in this dialogue?
image

Many thanks for this - it’s a great help, as several of my colleagues at our amateur theatre still use the 2017 version.

Having used it once and chosen a version, the second option works invisibly and just saves a copy with the version suffix. Great.

I have used Jim Foltz’s JF Save As… but in 2024 it does something odd to the file saved as v2017. It opens fine in 2017 Pro, but opened in 2021 the component browser is completely empty.

And the code needs updating for each later version than the one current when it was written, some years ago.

Yours will take over from Jim’s in 2024 onwards.

1 Like

All of your statements are true. :wink:

The Save A Copy… menus using the original file name (path) as a base + the version dependent suffix.
The Save actual… menus using the original file name (path) as a base. (Does not add suffix, by design.)

Obviously, if the file has not been saved yet, it does not have an original/existing name (path). Also, if the file has not been saved yet, it is impassible to make a copy. You cant use its original name, because it does not exist. In this case the 1st, 2nd and 4th menu item should be grayed out.
(I heard that, on Mac the validation process - which is “responsible for greying” - isn’t called as often as it on Windows, so perhaps this is different for you on Mac… and I can’t do anything against it. )

You can use the native Save (As…) command, witch give you an Untitled.skp base name and the default location folder according to Preferences>Files>Models.

However: If you click on the 3rd menu item - Save actual model as version…(Select) - , and the file has NOT been saved before - by design:
I omitted the name Untitled.skp, because normally you will overwrite it anyway, and instead using the default location, It will give the last used folder as a location. So you can use this or the native Save command to make initial saving.

If you click on the 3rd menu item - Save actual model as version…(Select) - , and the file has been saved before - by design: you will get original file name (path) as a base and do not need to type anything, but still possible if you wish.

If file has been saved before and If you click on the 1st menu item - Save A Copy AS version…(Select) - by design: you will get original file name (path) + version suffix as a base and do not need to type anything, but still possible if you wish.

If file has NOT been saved before the 1st menu item should be grayed out. If not grayed out, because of the Mac behaviour mentioned above, you should get an error message "Model must be saved before saving a copy. "

1 Like

this is awesome, it works
thanks so much

1 Like