Gets all pending change information for the PointGroup.
public PointGroupChangeInfo GetPendingChanges()
Public Function GetPendingChanges As PointGroupChangeInfo
public: PointGroupChangeInfo^ GetPendingChanges()
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); }
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