Comparing different versions of drawing

Sometimes you can end up with a number of autosaved versions of a drawing. It can be difficult to know whether you want to keep the original file or an autosaved version. This could apply to other situations where there are multiple versions of the same basic drawing.

Is there any way of automating the process of comparison to produce either a report, or better still a visual markup, of the differences between two versions? I am expecting the answer to this to be no but for it to be theoretically possible for someone who knows how to program.

If you have a system for an order, and it is in one folder: Tigā€™s ruby snippet might do what you want:

Perhaps with Appleā€™s Automator, you can make a workflowā€¦

Thinking outloud: Perhaps a LayOut template can help you as wellā€¦

Huh?

Hereā€™s an example from a folder:

59

I havenā€™t investigated TIGā€™s post yet but is there any significance to it being about thumbnails?

BTW, are you Mike or Jack??

Donā€™t understand that either!

it is Jack, nice to meet you!

The Avatar seemed like a good idea, at the time I registered for different forums I had to watch Monster Inc several times a week with my kidsā€¦

They said I looked like Mike Wayzovskiā€¦

regarding paperwork, that isā€¦

The snippet Tig provided gives you a folder with all the thumbnails.

2 Likes

I would think so. Given the way backup software compares files and only copies the changed ones, I would think you could take two SU files, A and B, and generate three new files that are A and B, A and not (A and B), and B and not (A and B). The first would be only what is common to both files, the second would be only whatā€™s in A that isnā€™t common to both, and the third would be whatā€™s in B and not common to both. Again, thatā€™s the kind of thing a computer is better at than a person.

Trouble is SketchUp files are binary, so the various differences would be unintelligible and almost surely broken in ways that would prevent SketchUp from opening them :dizzy_face:

1 Like

I wonder if someone could do something using the C SDK? Iā€™ve never programmed to it, so this is purely speculation, but it seems like one could open and read two SketchUp files to analyze differences between their geometry contents and write out a SketchUp model containing just the changes.

Thatā€™s admittedly very glib! I donā€™t know whether unique object ids are saved in the files, and without them it would come down to a very tedious comparison of individual geometry entities.

Why would one choose to accumulate old AutoSave files?

By default, when you open an SKP file the 5-minute Auto-Save clock starts.
At the 5-minute mark SU creates an AutoSave_File Name.skp file of the active model in its current state.

At the next 5-minute mark, SU creates a new AutoSave_File Name.skp file of the active model in its current state, overwriting the existing AutoSave_File Name.skp file.

And so on, every five minutes.


Any time you save the active model file the AutoSave_File Name.skp file is deleted; the 5-minute Auto-Save clock starts and at the 5-minute mark, SU creates a new AutoSave_File Name.skp file of the active model in its current state.

When you save and close the active model, the AutoSave_File Name.skp is automatically deleted.
The only time the AutoSave_File Name.skp file is permanently saved to disc is when SU exits abnormally.
That is, when it crashes.


All the above is to illustrate that, after a crash, if you find an AutoSave_File Name.skp file, it would be the most current version of the model.

Open the AutoSave file and have a look.

If itā€™s OK, thenā€¦
File > Save As ā€¦ Give it the original file name to overwrite the existing original.

OR

File > Save As ā€¦ Give it the original file name appended, say, with _001 to preserve the existing original.

Either way, the AutoSave file is no longer needed.
Go back to the folder and tidy up; delete the now redundant AutoSave file.


Setting File Recovery Preferences ā€” SketchUp Help
https://help.sketchup.com/en/sketchup/setting-software-and-file-preferences#file-recovery

Believe me, I donā€™t choose to do so! As you can see from my screenshot, that folder has a number of autosave files of the same drawing. How they became multiple, I am not sure. Crashing is a possibility but I donā€™t get SU crashing all that often.

One reason I raised this is that I conceived that collaborative working might result in multiple, ostensibly similar, files (not Autosave files) where the facility I was after might come in handy. Thatā€™s not a problem for me but might be for others.

It is easy to compare file timestamps to see the temporal relation, or hash codes of models/groups/component instances to see whether something is changed or not on the instance level.

But it takes a lot of effort to find out what is different and how it was changed. You would have to compare vertex positions since not all entities have persistent IDs. The most challenging is a good GUI to represent the analysis to the user, and this is very specific to SketchUpā€¦

This is a standard problem for plain text file formats (for which exist good off-the-shelf GUIs), but as it has been said, SketchUp files are binary.

Another problem is merging files (which people will soon request once they can see differences), and even for plain text files, merging can result in broken files.

This would be a huge effort if you want to go further than the instance level.

if a real demand and one is willing to invest expenditure as well as money this can be achieved by exporting the affected documents to a neutral resp. common file format and do a comparison of geometrics with an external tool specialized in doing this as e.g. TransMagics commercial ā€˜MagicCheckā€™ application (trial avail.):

1 Like