70002177 new Dwg Export Flags

Article 70002177
Type Wish
Product Converter
Version 9003
Date Added 3/17/2022 12:00:00 AM
Fixed 10.1001.0.1 (3/17/2022 12:00:00 AM)
Submitted by Wayne Romer


New property for Dwg / Dgn drawing export


A new property ExportDWGFlags of vdDocument.FileProperties was exported in version 1001.0.1
Controls the export of dwg/dgn files.
It can get one or more of the following values

            Default //The default value None of the below selected

            IgnoreUnusedBlocks //If selected unused blocks are not exported

            IgnoreXproperties //If selected Xproperties are not exported

             If selected, invisible entities are not exported.
             Usually entities in frozen or off layers or with Invisible visibility
            Export only the entities that are selected by vdCommandAction.CmdSelect(object)
            Selection can be get as follow:vdDocument.Selections.FindName("VDRAW_PREVIOUS_SELSET") 
            Export only the vdPolyface objects in the model layout
             vdSelection set = new vdSelection();
             set.IgnoreGroups = true;//ignore groups so only selected items will be exported
             //select all vdPolyface objects in the model layout
             foreach (vdFigure item in doc.Model.Entities)
                vdPolyface pf = item as vdPolyface;
                if (pf != null) continue;
             doc.CommandAction.CmdSelect(set);//add the selection the docucument default selection see: doc.Selections.FindName("VDRAW_PREVIOUS_SELSET")
             doc.SaveAs("test.dwg");// save the drawing to dwg format where only polyfaces will be exported

            If selected, Externareferences Layers are not added.
            Useful when dynamically create a drawing with External References with huge entities in order to minimize saving time and memory usage
             If selected, exported drawing does not update extents
            Useful when exporting a huge drawing  in order to minimize saving time and memory usage

             A combination of all Ignore.. values  = IgnoreUnusedBlocks | IgnoreXproperties | IgnoreInvisible | IgnoreXRefDependentLayer | IgnoreExtents,

Send comments on this topic.