Version property

Dear Acad gurus, I try to connect to AutoCAD from other application programmatically (on run-time) The issue is that I try to obtain the client AutoCAD version.
I make an instance of the AutoCAD as an OLE, and obtain the version property. I tried it on various AutoCAD versions in order to know what will I get. The results are: AutoCAD 2004 -> 16.0s (LMS Tech) AutoCAD 2002 -> 15.06s (LMS Tech) AutoCAD 2000 -> ?????? AutoCAD 14 ->14.0 Does it mean that if first two digits are 16 it will always be AutoCAD 2004? What version should I expect from AutoCAD 2000 & AutoCAD 2000i? Thanks,
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
HiHO; The first six bytes of a DWG file identify its version. AC1018: AutoCAD 2004 AC1015: AutoCAD 2002, 2000i, 2000 AC1014: AutoCAD Release 14 (Release 14 sample drawings use AC1013) AC1012: AutoCAD Release 13 AC1009: AutoCAD Releases 12, 11 AC1006: AutoCAD Release 10 AC1004: AutoCAD Release 9 AC1002: AutoCAD Release 2.6 AC1.50: AutoCAD Release 2.05

2004?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I think you misunderstood the question. The OP wants to "obtain the client AutoCAD version", not identify a file.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

To the best of my knowledge, using this: (atoi (substr (getvar "acadver") 1 2))
R2004 will return 16 R2002, R2000i, R2000 will return 15 R14 will return 14
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thanks for all repliers, very helpful. I think i didn't explained myself very well. I try to take the version outside AutoCad, by instanceing AutoCad as OLE object and use the version property. So, the results are diffrent from what I get from DWG file (it could be great idea, but it don't fit me) As well, (atoi (substr (getvar "acadver") 1 2)) Is problematic for me since i'm , actually , outside from AutoCad, so I got the folowing results with the version property: AutoCAD 2004 -> 16.0s (LMS Tech) AutoCAD 2002 -> 15.06s (LMS Tech) AutoCAD 14 ->14.0 The problem that I can't install AutoCad 2000 or 2000i since i'm use XP. Does anyone know what value the version property will return on AutoCad 2000 & 2000i? Thanks again,
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

AutoCAD 2000 and 2000i can be installed in XP, check out compatibility mode.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Ok, so in whatever language you are using, take the returned value and strip it down to an integer. Then compare to:
16 = R2004 15 = R2002, R2000i, R2000 14 = R14
If you need to tell the difference between 2000 and 2000i and 2002 - do a google search, it's out there. There are different values depending on level of service pack, etc.
All versions of AutoCAD from R13 up will run on XP - as verified by me :) R12 might even work also.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Thank you very much, That's exactly what I've been looking for! Thanks, thanks, thanks! BTW, officially, XP support only AutoCAD 2004 & 2002 I'll goggle for the difference between 2000, 2000i & 2002 Have a great day!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Did you really expect Autodesk to tell you that you can use older versions? They want to sell you a new one.

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I guess their a lot of truth in what u writing, but for me, with my application that communicate with AutoCAD, under XP, It does not work with 14, but it work with 2002 & 2004, So, I'm blocking the user for use in such configuration (14 & XP). Maybe the reson is another one. But it give me a fair solution to my problem. Thanks,
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I never said anything about "supported" on XP, I only said R13 and up would "run" on XP.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.