70002394 Dublicate added items not to thrown an exception

Article 70002394
Type Wish
Product Engine
Date Added 8/9/2023 12:00:00 AM
Fixed 10.1004.0.6 (8/9/2023 12:00:00 AM)
Submitted by Wesley Beer

Summary

Dublicate added items not to thrown an exception

Solution

In version 1004.0.6 a new Flag IgnoreDublicateItems of vdDocument.OpenFlags was added
If IgnoreDublicateItems is selected The DublicateItemInCollection exception is not thrown, Duplicate items are not added to the collections, and a vdDocument.GenericError is fire.

Example

vdDocument doc;
doc.Openflags |= vdDocument.OpenFlagsEnum.IgnoreDublicateItems;
doc.Model.Entities.AddItem(doc.Model.Entities.Last);

Send comments on this topic.