PDA

View Full Version : Dwg version?


pearlx100
2009-04-17, 05:17 PM
Is there a way with lisp to find out when a end user opens up a dwg using AutoCad 2009 it a pop up will tell you if the dwg is a 2009 or 2007?

Thanks!!!!

ccowgill
2009-04-17, 05:26 PM
Is there a way with lisp to find out when a end user opens up a dwg using AutoCad 2009 it a pop up will tell you if the dwg is a 2009 or 2007?

Thanks!!!!
no way to tell, because a 2009 drawing is a 2007 drawing. in other words, 2007 is version 17, 2009 is version 17.2 drawings from both versions are version 17

lee.johnson
2009-04-17, 08:27 PM
Isn't 2009 a new platform? 2008 is a version of 2007

ccowgill
2009-04-17, 09:34 PM
Isn't 2009 a new platform? 2008 is a version of 2007
nope, 2010 is the new platform, 2009 is a version of 07

rkmcswain
2009-04-17, 10:38 PM
Isn't 2009 a new platform? 2008 is a version of 2007

It's been this way now for many years....

2000, 2000i 2002 = 2000 DWG format
2004,2005,2006 = 2004 DWG format
2007,2008,2009 = 2007 DWG format
2010, 2011?, 2012? = 2010 DWG format

BoKirra
2009-04-20, 05:29 AM
This doesn't help you to identify the drawing created by 2009 or 2007.
But just FYI:
When you open a drawing, you can find the following message on the text screen:

Opening an AutoCAD 2007 format file.
...

irneb
2009-04-20, 12:18 PM
The only way you could hope to distinguish a 2007 & 2008 would be to check if some new entity type / property has been defined, e.g. Annotative. Between 2008/9 I don't think there's any "new" entity type / property. The same applied previously with 2004/5/6, where DB's were only available in 2006.

This is a long and tedious process, as you need to open the drawing & then run through all (entnext), checking if any have a Annotative scale applied. But still, even if it was created in 2009 and no anno was used - you'd be incapable of determining which version created / last modified the drawing.

If you want to check (inhouse) what versions are used ... you could add something to ACADDOC.LSP to create a log file for each drawing opened. Something stating computername, username, ac version and date/time. Unfortunately this can't work with DWG's from outside :cry:

l3ch
2009-04-20, 04:16 PM
Why not? If pearlx100 programmes for end users, I supposse he will give the routine and the instructions to run it in every open.

So, the routine must get the ACADVER variable, compare it with some property of the file (where he previously writes the last acad version) and decide if it is a new version. The problem, for me, is if the end user does not make any change. This is, what if the end user doesnot want to be only an end user. But this should be another history...

But all this remember me another situation. I have a problem with the authenticy of my drawing, once they are in the end user's pc. In many times they alterate my drawings without my knowledge and some times I have discussions about what we really said. If I could write the saving time in some hidden property of the file, which the end user had not idea, I could easy demonstrate the manipulation ( I believe my customers usually have not enough skills to skip this protection).

irneb
2009-04-20, 04:53 PM
Well, that's another way of making a log file. You simply place the "log" inside something like a dictionary. Maybe using vlax-ldata-put. You could even try using something like a hashcode to generate a unique code comparing the actual DWG file contents. That way the file date (which can be modified manually) is of no concern.

But isn't this a bit off topic from the OP? pearlx100 simply wanted to know which version last saved the DWG. I use DWGIcon (http://www.cushat.co.uk/di/)to determine the major versions graphically before opening the files. But it still doesn't show a difference between 2007 (17.0), 2008 (17.1) and 2009 (17.2). It does show if saved in 2000 (15), 2004 (16) or 2007 (17).

Another problem ... it is still possible to save back to an older version file. So even though 2009 is used, the DWG may even show a 2004 major version.