70001585 resolve huge value HandleId number in export vds

Article 70001585
Type Wish
Product Engine
Version 8002
Date Added 7/24/2019
Fixed 8.8003.0.3 (7/26/2019)
Submitted by Brendan Fry

Summary

I would like huge handle values to become smaller in order web control not to face problems with the huge handle values.

Solution

In version 8001.0.3 a new method ResolveHandles() has been exported.

This method will reset all handles of the drawing and also set it's maximum handle. It should be used if the maximum handle of the drawing becames very big.
If the user have noticed that the handles values are really big, is able to call doc.ResolveHandles() so the handles will get new smaller values.
The maximum handle value that browsers support is 2^53 = 9 007 199 254 740 992. A bigger value than this will cause a crash in the operation.
If you open a drawing by VDF in order to export it as .vds file and open it through a browser you can check in the AfterOpenDocument event for example
if (doc.HandleCurrent > 9000000000000000) doc.ResolveHandles();//leave lot of handles in case you want to add extra entities

Send comments on this topic.