So, recently got AutoCAD 2019 and see that it has a COMPARE command; works great, but tedious to load files. I wanted to make a simple script that would compare two files, and save the compared file to another folder; one file looks like this in the script:
Code:
FILEDIA 0
-COMPARE
"C:\Test\ORG\1-ORG.dwg"
"C:\Test\NEW\1-NEW.dwg"
SAVEAS
2010
"C:\Test\Result.dwg"
CLOSE
FILEDIA 1
The issue is that the COMPARE command opens the first file, moves all geometry to a new drawing, closes that file, opens the second file, moves all geometry to the same new drawing, then does the compare. My script sits in the original drawing waiting for focus to come back, so the "SAVEAS" part never applies to the newly created drawing (in fact, it actually applies to the second drawing, which has had all of its geometry moved to the compare, so I get a folder full of blank files).
I realise my "script" is very basic, but is there a (simple) way to have my script issue those SAVEAS, 2010, "C:\Test\Result.dwg", and CLOSE to the newly created drawing? The script is generated by VBA, which does the initial matching/finding of similar files, so it would be easy for me to automatically generate proper code.
The script will always be run in a "blank" drawing (called Drawing1.dwg), and the temporarily created drawing will be named with a known name (in the example above, AutoCAD will have temporarily named it "Compare_1-ORG vs 1-NEW")