Document.Export(String, String, ViewSet, DWFExportOptions)
Method
Description:
Exports the current view or a selection of views in DWF format.
Exports the current view or a selection of views in DWF format.
Remarks:
All the views must be printable in order for the Export to succeed. It can be assured by checking the CanBePrinted property of each view.
All the views must be printable in order for the Export to succeed. It can be assured by checking the CanBePrinted property of each view.
Examples
public bool ExportViewToDWF(Document document, View view, string pathname)
{
DWFExportOptions dwfOptions = new DWFExportOptions();
// export with crop box and area and room geometry
dwfOptions.CropBoxVisible = true;
dwfOptions.ExportingAreas = true;
dwfOptions.ExportTexture = false;
ViewSet views = new ViewSet();
views.Insert(view);
return (document.Export(Path.GetDirectoryName(pathname),
Path.GetFileNameWithoutExtension(pathname), views, dwfOptions));
}
Parameters
Parameter | Type | Description |
---|---|---|
folder | String | Output folder, into which file(s) will be exported. The folder must exist. |
name | String | Either the name of a single file or a prefix for a set of files. If <span class="keyword"><span data-languagespecifictext="cpp=nullptr|vb=Nothing|nu=null" id="LSTA9737E9E_1"></span></span> or empty, automatic naming will be used. |
views | ViewSet | Selection of views to be exported. |
options | DWFExportOptions | Various options applicable to the DWF format. If <span class="keyword"><span data-languagespecifictext="cpp=nullptr|vb=Nothing|nu=null" id="LSTA9737E9E_2"></span></span>, all options will be set to their respective default values. |
Return Value
Type | Description |
---|---|
Boolean | Function returns true only if all specified views are exported successfully. Returns False if exporting of any view fails, even if some views might have been exported successfully. |
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Thrown when the input views is |
ArgumentException | Thrown when the input views is an empty ViewSet. |
InvalidOperationException | Thrown when the current document is not modifiable. |