Results 1 to 2 of 2

Thread: Automating the COMPARE command

  1. #1
    Active Member
    Join Date
    2013-06
    Posts
    67
    Login to Give a bone
    0

    Default Automating the COMPARE command

    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")
    Last edited by ettore_c; 2019-03-07 at 06:56 PM.

  2. #2
    Active Member
    Join Date
    2013-06
    Posts
    67
    Login to Give a bone
    0

    Default Re: Automating the COMPARE command

    Another idea is to modify the COMPARE command to do what I want (potentially updating it to accept more inputs, like savename/location); can that be done, or are commands like this stored in such a way they can't be changed?

Similar Threads

  1. 2013 Automating nwcout in Revit?
    By pauljordan in forum NavisWorks - General
    Replies: 4
    Last Post: 2013-02-02, 05:13 AM
  2. PR21-2: Automating CAD Standards
    By Autodesk University in forum Computer Programming
    Replies: 0
    Last Post: 2012-11-24, 07:38 PM
  3. MG21: Automating CAD Standards
    By Autodesk University in forum CAD Management
    Replies: 0
    Last Post: 2012-11-19, 03:44 PM
  4. Automating Viewports in AutoLISP
    By sdrewinc432892 in forum AutoLISP
    Replies: 5
    Last Post: 2012-05-21, 07:44 PM
  5. Examples Anyone? Automating CAD Setup
    By chillme1 in forum AutoLISP
    Replies: 16
    Last Post: 2010-03-26, 03:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •