Get/Set PartID

Does anyone have any trouble setting the PartID field of a node? When I create the node I do, for example: n.PartID = 3456;

This seems to compile, but when I select the node and look up the PartID it is set to -1. What gives? Am I doing something wrong? I need to have a unique number for each node so I can lookup additional info when the user selects it.
Maybe there is a different way to do this?
Thanks

From the User Guide:

To simplify the generation of unique IDs for nodes and ports and links, GoDocument has a property that automatically makes sure that each node, port, or link that is added to the document has a unique PartID. Just set the GoDocument.MaintainsPartID to true. All objects that implement the IGoIdentifiablePart interface provide a PartID property; this is set by GoDocument as objects are added to the document.

When you need to refer to objects, such as to the ports of a link that you are storing, you can just pass the PartID. Upon loading, you can find the IGoIdentifiablePart in the document with that ID by calling GoDocument.FindPart. Remember to save the LastPartID in your document too, to avoid any possible duplicate PartIDs.

Of course, you can implement your own mechanism for keeping track of identities, instead of using PartID. Typically you will have one or more hash tables used to map key values to nodes and perhaps ports if there might be more than one port in a node. (DataSetDemo does this.)