Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

last saved version button

6 REPLIES 6
Reply
Message 1 of 7
ewcler
631 Views, 6 Replies

last saved version button

I often share dwg files with other departments, customers, and vendors.  And from time to time, I have had issues with the autocad version that was used to create/modify a file is of a later version than someone downstream can handle.  We deal with several non-autocad uses of dwg information (like mastercam, and trumpf laser cutting software etc...)

Is there a way to see what version of autocad created or modified a particular document other than opening a *.dwg file with notepad?  I was thinking that there might be a simple lisp routine that might get the job done.  Any thoughts would be appreciated.

Eddie Cler
Paul's Machine & Welding Corp.
Dell Precision T3600- Xeon E5-1620 @ 3.6 GHz 32GB Ram - Nvidia Quadro 4000 Windows 7
Tags (2)
6 REPLIES 6
Message 2 of 7
Kent1Cooper
in reply to: ewcler


@ewcler wrote:

....Is there a way to see what version of autocad created or modified a particular document...?  I was thinking that there might be a simple lisp routine that might get the job done.  Any thoughts would be appreciated.


I'm not sure you can get at the information once in the drawing, to extract it with Lisp or something rather than look at it on-screen, or find it without opening the drawing.  But if you just want to "see" it, when I open drawings, the very first thing at the top of the Text Screen is always:

 

Opening an AutoCAD XXXX format file.

Kent Cooper, AIA
Message 3 of 7
Lee_Mac
in reply to: ewcler

Here is my function:

 

(defun c:getversion ( / f v )
    (if
        (and
            (setq f (open (strcat (getvar 'dwgprefix) (getvar 'dwgname)) "r"))
            (setq v
                (cdr
                    (assoc (strcase (substr (read-line f) 1 6))
                       '(
                            ("AC1024" . "2010-2012")
                            ("AC1021" . "2007-2009")
                            ("AC1018" . "2004-2006")
                            ("AC1015" . "2000-2002")
                            ("AC1014" . "Release 14")
                            ("AC1012" . "Release 13")
                            ("AC1009" . "Release 11/12")
                            ("AC1006" . "Release 10")
                            ("AC1004" . "Release 9")
                            ("AC1003" . "Release 2.60")
                            ("AC1002" . "Release 2.50")
                            ("AC1001" . "Release 2.22")
                            ("AC2.22" . "Release 2.22")
                            ("AC2.21" . "Release 2.21")
                            ("AC2.10" . "Release 2.10")
                            ("AC1.50" . "Release 2.05")
                            ("AC1.40" . "Release 1.40")
                            ("AC1.2"  . "Release 1.2")
                            ("MC0.0"  . "Release 1.0")
                        )
                    )
                )
            )
        )
        (princ (strcat "\nThis is an AutoCAD " v " format file."))
        (princ "\nThe format of this file could not be determined.")
    )
    (if f (close f))
    (princ)
)

 

Release codes taken from here.

Message 4 of 7
ewcler
in reply to: Kent1Cooper

I tried that and found it to work just as you said.  However, it requires me to open each file individially.  I guess I am looking for something that can be applied in a more robust manner.  Ideally, added to the plot stamp, or title block etc...

Eddie Cler
Paul's Machine & Welding Corp.
Dell Precision T3600- Xeon E5-1620 @ 3.6 GHz 32GB Ram - Nvidia Quadro 4000 Windows 7
Message 5 of 7
ewcler
in reply to: Lee_Mac

Lee, 

I think this is the kind of thing I was looking for.  I'll try it out this afternoon.

Eddie Cler
Paul's Machine & Welding Corp.
Dell Precision T3600- Xeon E5-1620 @ 3.6 GHz 32GB Ram - Nvidia Quadro 4000 Windows 7
Message 6 of 7
M_Hensley
in reply to: ewcler

If you install Autodesk's free program DWGTrueView it has a batch convert command. You can select many files to convert and it lists the current version beside each filename. You can look at what version each file is, remove the ones that are already the correct version, then batch convert the ones that are not.

Message 7 of 7
Lee_Mac
in reply to: ewcler


@ewcler wrote:

Lee, 

I think this is the kind of thing I was looking for.  I'll try it out this afternoon.


Excellent, let me know how you get on Smiley Happy

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost