Sets the PointNumber for multiple CogoPoints with different values.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0
Syntax
C# |
---|
public ObjectIdCollection SetPointNumber( IEnumerable<ObjectId> pointIds, int additiveFactor ) |
Visual Basic |
---|
Public Function SetPointNumber ( _ pointIds As IEnumerable(Of ObjectId), _ additiveFactor As Integer _ ) As ObjectIdCollection |
Visual C++ |
---|
public: ObjectIdCollection^ SetPointNumber( IEnumerable<ObjectId>^ pointIds, int additiveFactor ) |
Parameters
- pointIds
- Type: System.Collections.Generic..::..IEnumerable<(Of <(<'ObjectId>)>)>
A sequence of ObjectIds of the points to set the PointNumber for.
- additiveFactor
- Type: System..::..Int32
The offset value that will be added to the original PointNumber for each subsequent point.
Return Value
An ObjectIdCollection containing the CogoPoints which have had their PointNumber set successfully.
Remarks
The order of the input pointIds will be changed. The returned value's order will not be the same as the input pointIds.
Examples

1// _civildoc is the active CivilDocument instance. 2// 3CogoPointCollection cogoPoints = _civildoc.CogoPoints; 4ObjectId pointId = cogoPoints.Add(new Point3d(100, 100, 50)); 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); 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)) 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) 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))