Sets the PointNumber for multiple CogoPoints with different values.
public ObjectIdCollection SetPointNumber( IEnumerable<ObjectId> pointIds, int additiveFactor )
Public Function SetPointNumber ( pointIds As IEnumerable(Of ObjectId), additiveFactor As Integer ) As ObjectIdCollection
public: ObjectIdCollection^ SetPointNumber( IEnumerable<ObjectId>^ pointIds, int additiveFactor )
1// _civildoc is the active CivilDocument instance. 2// 3CogoPointCollection cogoPoints = _civildoc.CogoPoints; 4ObjectId pointId = cogoPoints.Add(new Point3d(100, 100, 50), false); 5uint newPointNumber = 100; 6 7// set for single point 8if (cogoPoints.SetPointNumber(pointId, newPointNumber) == ObjectId.Null) 9 write("SetPointNumber failed.\n"); 10 11Point3dCollection points = new Point3dCollection(); 12points.Add(new Point3d(50, 50, 25)); 13points.Add(new Point3d(200, 200, 15)); 14ObjectIdCollection pointIds = cogoPoints.Add(points, false); 15List<ObjectId> pointIdList = GetListFromCollection(pointIds); 16 17// set multiple points to multiple values 18int offsetValue = 10; 19ObjectIdCollection success = cogoPoints.SetPointNumber(pointIdList, offsetValue); 20write(String.Format("SetPointNumber success for {0} of {1} points.\n", 21 success.Count, pointIdList.Count));
1' _civildoc is the active CivilDocument instance. 2' 3Dim cogoPoints As CogoPointCollection = _civildoc.CogoPoints 4Dim pointId As ObjectId = cogoPoints.Add(New Point3d(100, 100, 50), False) 5Dim newPointNumber As UInteger = 100 6 7' set for single point 8If cogoPoints.SetPointNumber(pointId, newPointNumber) = ObjectId.Null Then 9 write("SetPointNumber failed." & vbLf) 10End If 11 12Dim points As New Point3dCollection() 13points.Add(New Point3d(50, 50, 25)) 14points.Add(New Point3d(200, 200, 15)) 15Dim pointIds As ObjectIdCollection = cogoPoints.Add(points, False) 16Dim pointIdList As List(Of ObjectId) = GetListFromCollection(pointIds) 17 18' set multiple points to multiple values 19Dim offsetValue As Integer = 10 20Dim success As ObjectIdCollection = cogoPoints.SetPointNumber(pointIdList, offsetValue) 21write([String].Format("SetPointNumber success for {0} of {1} points." & vbLf, success.Count, pointIdList.Count))