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.4.2516.0

Syntax

C#
public AlignmentEntity GetEntityByOrder(
	int index
)
Visual Basic
Public Function GetEntityByOrder ( _
	index As Integer _
) As AlignmentEntity
Visual C++
public:
AlignmentEntity^ GetEntityByOrder(
	int index
)

Parameters

index
Type: System..::..Int32
The index at the alignment path, starting from 0

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:
CopyC#
1ent = entityCollection.GetEntityByOrder(0);  // ent = entity1
2ent = entityCollection.GetEntityByOrder(1);  // ent = entity2
3ent = entityCollection.GetEntityByOrder(2);  // ArgumentException, entity not found

Exceptions

ExceptionCondition
System..::..ArgumentOutOfRangeException Thrown when the index is out of connected alignment entity range.

See Also