Add unique key to node


#1

I’m comparing your product and Addflow and making dicision to buy
But i found some different, this your product cannot assign unique key to node,Can you demo me the sample of assign unique key to added node?


#2

Look at the samples delivered in the demo.



There are some functions like MakeUniqueKey or so…



You could also do a static variable incremented in the

constructor…



like:



private static ulong ulUniqueID = 1;



GraphNode:GoTextNode

{

GraphNode()

{

ulUniqueID++;

}

}



Attention: this is not the complete solution.

After an overflow this will restart by 0,

you should consider deleting of objects also, to have

always enough space for these IDs.


#3

A much easier solution is to just set GoDocument.MaintainsPartID to true. Then each document object (including nested ones) that implements IGoIdentifiablePart will get a unique PartID value.
Classes that implement IGoIdentifiablePart include GoNode (and therefore its subclasses), GoPort, GoLink, GoLabeledLink, and GoComment.