CogoPointCollectionSetPointNumber(IEnumerableObjectId, Int32) Method |
Sets the PointNumber for multiple CogoPoints with different values.
Namespace: Autodesk.Civil.DatabaseServicesAssembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntaxpublic 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
)
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
2
3CogoPointCollection cogoPoints = _civildoc.CogoPoints;
4ObjectId pointId = cogoPoints.Add(new Point3d(100, 100, 50), false);
5uint newPointNumber = 100;
6
7
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
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
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
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
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))
No code example is currently available or this language may not be supported.
See Also