70001899 ExportScript of a vdDocument with huge handle values

Article 70001899
Type Wish
Product WebJS
Version 8006
Date Added 1/12/2021 12:00:00 AM
Fixed 9.9001.0.1 (1/12/2021 12:00:00 AM)
Submitted by VectorDraw Team

Summary

ExportScript of a vdDocument with huge handle values

Solution

The maximum handle value that browsers support is 2^53 = 9 007 199 254 740 992.If an object has a bigger handle value this will cause problems to the javascript web control.

In version 8007.0.1 when a file is exported to a vds, VDF checks the vdDocument HandleCurrent and if it is bigger than 9000000000000000 then it will auto resolve the handles for the exported VDS (not for the passed VDF document) to smaller values. Also the HandleCurrent for the VDS file is changed. Foreach object handle change, the new vdDocument.OnVDSObjectHandleChanged event is fired, passing the object and the new handle.
If you want to resolve the handles for both the VDF vdDocument and exported VDS file then you must call the vdDocument.ResolveHandles before exporting the VDS file.

Send comments on this topic.