I was updating my CAD database from 2016 to 2018 with task scheduler and it got through all our files in about two days. 25000 files.
Then I checked the status and about 300 files were "Failed to open in Solidworks" and some had "Referenced files are read only". I checked some of them and these were not updated to 2018.
I want to update them, but it is hard to generate a list of these files (2016 version) from our database. Is it possible to create a list of files or something so I can update them in batch? I was wondering if Windows Explorer has an option, because there is a column value "SW Last saved with" but it is too slow for me.
SolidworksTask Scheduler
You can create a VBA macro to check the last saved solidworks version of each file in your database.
The key method is : SldWorks::VersionHistory
See 2018 SOLIDWORKS API Help - VersionHistory Method (ISldWorks) for more information.
The information returned by this method is like this: [The bold characters]
2800[2004/231]
3100[2005/204]
4400[2009/286]
7000[2013/262,2014/161,2014/292]
9000[2016/286] <===== the last one is usuallly is the last saved solidworks version.
9000 = SolidWorks 2016
10000 = SolidWorks 2017
11000 = SolidWorks 2018
So the idea is:
Check the last version information that returned,if it's not 11000 (sw2018),then open it with solidworks 2018 automatically and then save it (or you can manually save it).
I know nothing about your database,So I can't give you the needed code.
The attached swp will check the version of sw files in a folder(not include sub folder),
If not sw2018 file then open it and save it and then close it.
And it will create a report (text file) for you at the end.
Thank you Xiao Cake for your effort. Macro works great...
Include sub folder,See the attached file.
Thanks Xiao Cake, macro works great. I've tried it in one of my CAD folders, which contains only one project.
My database has CAD files in subfolders, that are part of on customer's folder. Is it hard to add searching through all subfolders of my main database folder? Is there any other option? Thanks.