70001050 Export polylines with different segment widths produce large vds file

Article 70001050
Type Wish
Product WebJS
Date Added 3/31/2017 12:00:00 AM
Fixed 7.7011.0.3 (4/1/2017 12:00:00 AM)
Submitted by Evget

Summary

Export polylines with Different segment widths produce large vds file.

Solution

From version 7011.0.3 vdDocument.ExportScript by default , does not convert the segment Widths of vdPolyline are to filled hatch in order to keep the size of the vds file small.
A new option in export to vds is available in version so the user is able to control the exporting of polylines with different segment widths


bool vdDocument.ExportScript(string filename,
ExportScriptFlags flags,
uint decimalPrecision,
char[] ExtraUsedChars,
int maxImageSize,
vdPrimariesList extraKeepPrimaries
)


        Converts and exports the document to the appropriate format in order to be opened by the vdWeb library.
        
        filename : The full filename where the document will be exported to, normally ending in a .vds suffix.
        flags :  ExportScriptFlags type argument that controls some exported parameters
        decimalPrecision : the decimal precision, meaning an integer value defining how many decimal points will be considered for equality comparisons.
                                      Also this many digits after the comma will be saved for every decimal value, in the document.
        ExtraUsedChars : A char Array object defining characters, that are not already present in the document,
                                     and the user wants to use in the javascript webcontrol when adding new text objects.
        maxImageSize : An integer that controls the maximum possible value of an image's bitmap (width x height). Default value is 552960 (a resolution of 768 * 720);
                                    If an image (width x height) is larger than this value then the image is scaled down to a value smaller or equal in order to keep the aspect ratio.
                                    Set it to 0 in order the default value to be used.
        extraKeepPrimaries : A vdPrimariesList collection contains objects from the document that normally
                                        would be purged, but the user wants to keep, such as empty layers or no used blocks.
        Returns :  True if successfully exported.
 

        public enum ExportScriptFlags
        {
            Default = 0,// Default properties are used
            ExplodePolylineWidths = 1, If set explode vdPolyline objects that has different segment widths.If not set vdPolyline.Widths are ignored
        }

Example:

vdDocument.ExportScript("c:/test.vds",ExportScriptFlags.ExplodePolylineWidths,8,null,0,null);

Send comments on this topic.