PointGroupGetPendingChanges Method

Gets all pending change information for the PointGroup.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.7.0.1190
Syntax
public PointGroupChangeInfo GetPendingChanges()

Return Value

PointGroupChangeInfo
A PointGroupChangeInfo object containing change information.
Remarks
Changes to a PointGroup are registered when points are added or removed from a drawing, and before PointGroup.Update() is called. However, changes are not registered if the PointGroup query is changed to include or exclude additional points. Note that the AllPoints PointGroup does not register changes.
Example
 1ObjectId allPointsId = _civildoc.PointGroups.AllPointsPointGroupId;
 2PointGroup allPoints = allPointsId.GetObject(OpenMode.ForWrite) as PointGroup;
 3
 4// add a point to the PointGroup:
 5Point3d pointLocation = new Point3d(125, 125, 50);
 6ObjectId pointId = _civildoc.CogoPoints.Add(pointLocation, "Example Point", false);
 7CogoPoint point = pointId.GetObject(OpenMode.ForRead) as CogoPoint;
 8
 9// remove a point from the PointGroup:
10_civildoc.CogoPoints.Remove(point.PointNumber - 1);
11
12// Pending Changes now detects that a point is added and removed:
13PointGroupChangeInfo changeInfo = pointGroup.GetPendingChanges();
14
15_editor.WriteMessage("# points removed: {0}\n# points added: {1}\n",
16    changeInfo.PointsToRemove.Length, changeInfo.PointsToAdd.Length);
17
18foreach (uint pt in changeInfo.PointsToAdd) 
19{ _editor.WriteMessage(" Adding point #: {0}\n", pt); }
20foreach (uint pt in changeInfo.PointsToRemove) 
21{ _editor.WriteMessage( "Removing point #: {0}\n", pt); }
See Also