Part id when redoing

I need to know the part id of the ActivityNode when I do a redo and is inserted into the goview. When I do undo, in the goview_changeDocument I know the part id, but when I do a redo it is always -1. Maybe I need to get the part id in another method, but I don’t know where.
An other question is, I’m doing autolayout() with a org charter, I don’t know how to change the space between the objects.
Thanks in advance!,

When and how are you checking the PartID during an undo or during a redo? Probably on a redo it just hasn’t been re-set yet, since I believe after an IGoIdentifiablePart is added to a document does its PartID get set.
Maybe you need to change the time at which you detect that an undo or a redo has occurred. There are special GoDocument.Changed events for that – check out the GoDocument.FinishedUndo and FinishedRedo Hints.
Also you might find a new sample app, UpdateDemo, instructive. It will be included in the 2.5 release.
You can set the GoLayoutLayeredDigraph.ColumnSpacing and LayerSpacing properties.