2027 Method
Changes 0
public bool Export(
	string folder,
	string name,
	ViewSet views,
	DWFExportOptions options
)
  • String
    folder
    Output folder, into which file(s) will be exported. The folder must exist.
  • String
    name
    Either the name of a single file or a prefix for a set of files. If null or empty, automatic naming will be used.
  • views
    Selection of views to be exported.
  • options
    Various options applicable to the DWF format. If null, all options will be set to their respective default values.
Return Value 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.
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));
}