Initially, I was planning a quick post to demonstrate the use of the Alignments API; concretely, the access to alignment entities and their types. As I was writing the code and evaluating the use of the API, it became obvious there are a couple of areas in desperate need of an explanation, and trying to do so in a single post, will make the article long and tedious.
What I will do instead is a series of postings, each one of them, explaining a specific “gray” area, and at the end, I will provide some extensions to ‘Colibra’ that, hopefully, will make working with alignment entities easier.
The first post will cover the ‘AlignmentEntityCollection’ class, which provides access to the entities in an alignment. The ‘AlignmentEntityCollection’ object is provided by the ‘Entities’ property of the ‘Alignment’, and defines an interface to access individual ‘AlignmentEntities’ by order and ID.
In a subsequent post, I will provide information about alignment entity types and the difference between ‘AlignmentEntity.GetType()’ and ‘AlignmentEntity.EntityType’. This is crucial to understand how to work with alignment entities.
Finally, I will provide some ‘wrapper’ classes in the ‘Colibra’ library to simplify working with alignment entities. I do not expect to provide a complete wrapper of the Alignments API, but I will provide a good starting point for you to leverage depending on your needs.
The alignment object and its entities are a very important piece of the Civil 3D API. Understanding how it works, it is crucial to understand other objects in the API. In this series, I will reveal the secrets of the alignment entities API, and how to work efficiently with them.
Comments
You can follow this conversation by subscribing to the comment feed for this post.