Method Open
- Namespace
- VectorDraw.Professional.vdObjects
- Assembly
- VectorDraw.Professional.dll
Open(string)
Opens the given supported file into this document. Can be a VDML, VDCL, DWG, DGN, DXF, IFC, DWF, STEP OBJ PLY SKP STA STL , image formats (bmp jpg tiff png), PDF, RTF, LAS/PointCloud, metafile or a supported script/web format.
public bool Open(string fileName)
Parameters
fileNamestringThe full path filename of the file to be opened.
Returns
- bool
trueif the operation was successful and the document was populated from the specified file; otherwisefalse.
Remarks
Supported behaviors:
- If
fileNameis null or empty, the method raises a generic error and returns false. - If the file extension is not a supported open format, the method raises a generic error and returns false.
- Non-vdraw legacy formats are delegated to ImportFromFile(string).
- For vdraw formats (.vdml, .vdcl) the method creates the appropriate deserializer (XML or GZIP), attempts to deserialize the document, and restores all temporary state (redraw, undo/history, freeze stacks) when finished or on error.
- On successful open the method loads external references, adjusts model print-paper drawing, and raises the OnAfterOpenDocument event.
- On failure, any raised errors are reported via RaiseGenericError.
Exceptions
- Exception
Exceptions during deserialization are caught and reported via RaiseGenericError; they are not rethrown.
- See Also