CogoPointCollectionSetPointNumber(IEnumerableObjectId, Int32) Method

Sets the PointNumber for multiple CogoPoints with different values.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public ObjectIdCollection SetPointNumber(
	IEnumerable<ObjectId> pointIds,
	int additiveFactor
)

Parameters

pointIds  IEnumerableObjectId
A sequence of ObjectIds of the points to set the PointNumber for.
additiveFactor  Int32
The offset value that will be added to the original PointNumber for each subsequent point.

Return Value

ObjectIdCollection
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.
Example
 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));
See Also