Application: CivilAlignments
Revit Platform: All
Revit Version: 2022.0
First Released For: 2022.0
Programming Language: C#
Skill Level: Medium
Category: Elements, Annotation
Type: ExternalCommand and ExternalApplication

Subject: Infrastructure alignments
Summary: 
Demonstrates the use of API for finding, property querying and annotating of infrastructure alignment elements.

Classes: 
Revit.SDK.Samples.CivilAlignments.CS.CivilAlignmentsApp
Revit.SDK.Samples.CivilAlignments.CS.CreateAlignmentStationLabelSetCmd
Revit.SDK.Samples.CivilAlignments.CS.ShowProperties

Project Files: 
CivilAlignmentsApp.cs
It contains the application class, which inherit from interface IExternalApplication and implements the OnStartup and OnShutdown methods.

Command.cs
It contains the command classes, which inherit from interface IExternalCommand and implements the Execute method.

Description: 
This sample provides following functionalities.
-	Places major and minor alignment station label sets along an alignment.
-	Displays a summary of properties of the alignment element and its attached alignment station label elements.

Instructions: 
Open CivilAlignments_BridgeSample.rvt. It is a metric project, to demonstrate necessary unit conversions to feet. The project contains an alignment. The project also contains two special Arrowhead styles, Major Station Arrowhead and Minor Station Arrowhead, which are necessary for proper setup of the major and minor alignment station label set types.
Other projects can be used, as long as they contain an alignment and have the aforementioned arrowhead styles defined.
1.	In the Add-ins Tab, launch the “Create Station Labels” command.
a.   After launching, the command starts a mode allowing you to pick an alignment
b.   Pick the alignment.
Expected result: 
•	Major and minor alignment station set tags are created. The major stations are placed starting at the alignment’s displayed start station, every 100m. The minor stations are placed every 10m for the first 100m.
•	In plan views, single alignment station labels are created at every start and end of the alignment’s horizontal curve geometry. 

2.	In the Add-ins Tab, launch the “Show Properties” command
a.	After launching, the command starts a mode allowing you to pick an alignment 
b.	Pick the alignment.
Expected result: a task dialog displays, listing the properties of the alignment, its horizontal curves and all of its associated station labels.