Comparing different versions of drawing

mac

#1

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.


#2

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…


#3

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??


#4

Don’t understand that either!


#5

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.


#6

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.


#7

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:


#8

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.


#9

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


#10

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.


#11

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.


#12

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.):