AlignmentEntityCollectionGetEntityByOrder Method

Gets an AlignmentEntity at a specified order index along the alignment path. This function behaves like the GUI in that disconnected alignment entities are not considered.

Namespace: Autodesk.Civil.DatabaseServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public AlignmentEntity GetEntityByOrder(
	int index
)

Parameters

index  Int32
The index at the alignment path, starting from 0

Return Value

AlignmentEntity
Exceptions
ExceptionCondition
ArgumentOutOfRangeException Thrown when the index is out of connected alignment entity range.
Remarks
This function can only get AlignmentEntity objects that are connected to the alignment. Connected AlignmentEntity objects have stations, super elevations, etc. For example, if you create an alignment which has 3 entities, entity1 and entity2 are connected, but entity3 is disconnected, the function result would be:
C#
1ent = entityCollection.GetEntityByOrder(0);  // ent = entity1
2ent = entityCollection.GetEntityByOrder(1);  // ent = entity2
3ent = entityCollection.GetEntityByOrder(2);  // ArgumentException, entity not found
See Also