I want to open an autocad file using C# program in asp.net and read the parameters of that .dwg file.I could able to open the .dwg file but dont know how to read the parameters like length,height of wall,doors,window and number of windows etc.
I opened the file by following code
Expand|Select|Wrap|Line Numbers
- using AutoCAD;
- public static AcadApplication gbl_open;
- public static AcadApplication gbl_app;
- public static AcadDocument gbl_doc;
- public static AcadModelSpaceClass gbl_modSpace;
- public static AcadAcCmColor gbl_color;
- public static double gbl_pi = 3.14159;
- public static AcadLayer TerminalsLayer;
- public static AcadLayer SwitchLayer;
- public static AcadLayer TerminationPoints;
- public void OpenDocument(string DocumentName)
- {
- gbl_open = new AcadApplication();
- gbl_doc=gbl_open.Documents.Open(DocumentName,true,"gg");
- gbl_open.Application.Visible = false;
- ExtractData();
- }
- public void ExtractData()
- {
- // Create some settings for the extraction
- int height=gbl_doc.Height;
- int width = gbl_doc.Width;
- }
I'm new to autocad.so I'm confused.can anyone help me?
dim505