GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoDocument Class / EnsureUniquePartID Method
In This Topic
    EnsureUniquePartID Method
    In This Topic
    Make sure every IGoIdentifiablePart in this document has a unique IGoIdentifiablePart.PartID.
    Syntax
    public virtual void EnsureUniquePartID()
    Remarks
    Although this is called automatically when setting MaintainsPartID to true, you may need to call this method explicitly after adding some objects to this document while SuspendsUpdates is true. You may also want to call this method explicitly after loading a document from persistent storage if there is a possibility of any inconsistencies. This method will also make sure that the value of LastPartID is at least as large as any IGoIdentifiablePart.PartID of any IGoIdentifiablePart in this document. If you set any IGoIdentifiablePart.PartID to a non-negative integer before adding the object to the document, you are responsible for making sure that the value is in fact unique within the document.
    See Also