Gets all pending change information for the PointGroup.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public PointGroupChangeInfo GetPendingChanges() |
Visual Basic |
---|
Public Function GetPendingChanges As PointGroupChangeInfo |
Visual C++ |
---|
public: PointGroupChangeInfo^ GetPendingChanges() |
Return Value
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.
Examples

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"); 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); }

1Dim allPointsId As ObjectId = _civildoc.PointGroups.AllPointsPointGroupId 2Dim allPoints As PointGroup = TryCast(allPointsId.GetObject(OpenMode.ForWrite), PointGroup) 3 4' add a point to the PointGroup: 5Dim pointLocation As New Point3d(125, 125, 50) 6Dim pointId As ObjectId = _civildoc.CogoPoints.Add(pointLocation, "Example Point") 7Dim point As CogoPoint = TryCast(pointId.GetObject(OpenMode.ForRead), 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: 13Dim changeInfo As PointGroupChangeInfo = pointGroup.GetPendingChanges() 14 15_editor.WriteMessage("# points removed: {0}" & vbLf & "# points added: {1}" & vbLf, changeInfo.PointsToRemove.Length, changeInfo.PointsToAdd.Length) 16 17For Each pt As UInteger In changeInfo.PointsToAdd 18 _editor.WriteMessage(" Adding point #: {0}" & vbLf, pt) 19Next 20For Each pt As UInteger In changeInfo.PointsToRemove 21 _editor.WriteMessage("Removing point #: {0}" & vbLf, pt) 22Next