Hi friends,
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,wind ow and number of windows etc.
I opened the file by following code
(Purpose is that by reading those parameter the program must be able to calculate the cost.)
I'm new to autocad.so I'm confused.can anyone help me?
dim505
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,wind ow and number of windows etc.
I opened the file by following code
Code:
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
Comment