The file version is stored in the first 6 bytes of the file.

AC1015 for R2000 files
AC1018 for R2004 files
AC1021 for R2007 files
...

Or are you looking for a function in libredwg that returns this value?

2010/12/13 Giampaolo Bellini <[email protected]>:
> Hi all
>
>   opening and parsing some dwg files I got a segmentation fault,
> probably due to unsupported version of dwg: is there a way to retrieve
> the dwg revision of a file before trying to parse it's contents ?
>
>         Giampaolo
>
>

Reply via email to