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

Summary

New property for Dwg / Dgn drawing export

Solution

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


            IgnoreInvisible
             If selected, invisible entities are not exported.
             Usually entities in frozen or off layers or with Invisible visibility
            
            ExportSelectionOnly
            Export only the entities that are selected by vdCommandAction.CmdSelect(object)
            Selection can be get as follow:vdDocument.Selections.FindName("VDRAW_PREVIOUS_SELSET") 
            Example
            Export only the vdPolyface objects in the model layout
            
             vdSelection set = new vdSelection();
             set.SetUnRegisterDocument(doc);
             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;
                set.AddItem(item);
             }
             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
            


            IgnoreXRefDependentLayer
            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
            
            IgnoreExtents
             If selected, exported drawing does not update extents
            Useful when exporting a huge drawing  in order to minimize saving time and memory usage
            

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

Send comments on this topic.