How to open a DWG file? What can be used to enable the DWG format? How to open a DWG file? Today, we recommend several widgets to preview and edit files in DWG format.
Cadviewx is a powerful CAD file and Image Browsing library. in environments that do not require third-party software, it provides CAD preview controls, CAD printing, CAD files, and other format pictures, you can also drag or zoom in the mouse. The editing control supports AutoCAD DWG, DXF, and all versions of the files.
Dbcad Dev is an excellent CAD control product. It integrates CAD, AM/FM, GPS and RDBMS and other technologies to make application development fast and simple, allows you to open vector files in DWG, DXF, and microstation.®Dgn, ESRI®Shape file format.
Of course there are other methods, such as the following:
In the C #. Net window, open the SHP and DWG file code:
Private void btnopen_click (Object sender, eventargs E)
{
Openfiledialog DLG = new openfiledialog ();
DLG. Filter = "shape file (*. SHP) | *. SHP | DWG file (*. DWG) | *. DWG ";
DLG. Title = "Open Source Data Documentation ";
// Define a string array for storing ifeatureclass
String filepath;
If (DLG. showdialog () = dialogresult. OK)
{
Filepath = DLG. filename;
This. textedit1.text = filepath;
// Obtain the coordinate system of the opened file
// String strspatialreferenct = This. getspatialreference (filepath );
// This. textedit3.text = strspatialreferenct;
// Obtain the path and file name of the file to be saved, and set the file to be written to the output path.
String savepath = This. getsavepath (filepath );
This. textedit2.text = savepath;
}
}