Never seen this before

So,

I wrote a dohicky (technical term for a macro) that is going through all the years and years of SolidWorks models I’ve collected, and listing them in an Excel spreadsheet with a picture.

It was trudging through a big folder when it burped on a file.

I went to open the file manually in SolidWorks and got this:
image.png
I have never come across this before.

That’s odd, have you tried opening it with another version? Sounds like your version has an issue opening an old file from SW 97Plus.

When I’ve seen this in the past it typically meant the file is corrupt. In some cases I’ve sent to SolidWorks and they were able to repair, in other cases not.

Yeah,

Doing a little digging, it was able to open other files of the same era, so the file was prolly corrupt.

Wow very interesting. I’ve often wanted to do similar thing with a macro but have never got around to attempting it yet as i’m the opposite of a code-understander. Would you be able to share the macro?

My hope is to eventually create a macro that will take the SW Part Properties “Created” and “Last Saved” dates and read them out and apply them to the file’s properties in Windows because how Windows handles these properties jumbles them up and for nostalgic reasons i was trying to automate it just for funsies on some of my oldest models!

Do you have a copy of the SolidWorks Document Manager API Key? https://support.hawkridgesys.com/hc/en-us/articles/360037482172-Requesting-A-Document-Manager-API-License-Key

If so, I’ll strip mine out and post a copy. The minions at DSS have made us pinkie-swear that we wouldn’t share it…

Share the macro anyway (of course remove/strip the key), as this may come handy for anyone looking to similar thing.

I will.

Unfortunately, it’s got a bug that is causing it to crash.

Let me get it resolved, and I’ll post it.

Okay,

When I developed this at work, we had the 32bit Microsoft Office installed. The routines in SolidWorks are 64bit, and thus would not run under Excel.

I migrated it to run under SolidWorks. SolidWorks has a bit more overhead than Excel, and I found when searching through very large folders, even though no actual SolidWorks routines were used, it would get problematic.

So, I migrated this back to Excel as I’ve got the 64bit version installed here. The only SolidWorks functions that this calls are in the SolidWorks Document Manager, thus “theoretically” SolidWorks doesn’t need to be installed, but you would have to get and register the Document Manager dll’s.

I’ve spent a lot of time filtering non-searchable files, but it’s possible you will have something I’ve not encountered and it will burp. There isn’t a ton of error checking in here.

You will have to insert your Document Manager Key here at the top of the routine.

It’s a bit wonky due to the length.

This will help: https://www.codestack.net/solidworks-api/troubleshooting/macros/too-long-vba-macro-line/

Have fun and let me know if’n you run into any problems.

This is what the output looks like:
Catalog.xlsm (96.3 KB)
cheers,

Hi doobes,

I didn’t have a key but applied for one and received it so when i get a chance i’ll give it a try. Thanks very much for your efforts and sharing!

Lemme know how it works out

There is probably a lot that could done to streamline the process.

Cheers