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.280
Syntax
C#
public AlignmentEntity GetEntityByOrder( int index )
VB
Public Function GetEntityByOrder ( index As Integer ) As AlignmentEntity
C++
public: AlignmentEntity^ GetEntityByOrder( int index )
Parameters
- index Int32
- The index at the alignment path, starting from 0
Return Value
AlignmentEntityExceptions
Exception | Condition |
---|---|
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:1ent = entityCollection.GetEntityByOrder(0); // ent = entity1 2ent = entityCollection.GetEntityByOrder(1); // ent = entity2 3ent = entityCollection.GetEntityByOrder(2); // ArgumentException, entity not found