Is there a way to get drawing size without opening the actual DWG file?

Is there a way to get drawing size without opening the actual DWG file?

kdongLVTHZ
Contributor Contributor
231 Views
1 Reply
Message 1 of 2

Is there a way to get drawing size without opening the actual DWG file?

kdongLVTHZ
Contributor
Contributor

I was able to get drawing size by opening the DWG file like this:

Document doc = CadApp.DocumentManager.Open(dwgfile, false);

 

But this code triggers opening the dwg in AutoCAD, which I want to avoid. Is there a way to get this 'doc' handle without explicitly open the dwgfile in AutoCAD as shown above?

 

Thanks!

KD

0 Likes
Accepted solutions (1)
232 Views
1 Reply
Reply (1)
Message 2 of 2

ActivistInvestor
Mentor
Mentor
Accepted solution

Aside from not knowing exactly what you mean by 'drawing size', you can use the Database.ReadDwgFile() method to access a drawing file without opening it in the editor. It returns an instance of a Database object that you must dispose when you are finished using it.

0 Likes