There are two main examples provided with the SDK installation – the Managed SDK Example and the Unmanaged SDK Example. These examples illustrate how to use some common, basic functionality of the SDK. For detailed explanation of the files included in the Managed and Unmanaged SDK Examples, view the later sections on developing with each one.
The example files below are located within the ManagedSDKExample solution under the Examples folder.
ManagedSDKExample > Create > HorizontalAlignments > Arc
CreateArcFromPoints()
The user is prompted for three point. The first two are linked by a temporarily drawn line. After the third point, an arc is created with the three points.
ManagedSDKExample > Create > HorizontalAlignments > Complex Alignment
CreateComplexAlignmentFromPoints()
The user places two data points. A complex horizontal alignment is created using these two points as a start line, with a start spiral, arc, end spiral, and end line. The direction and line length are determined by the user’s points.
ManagedSDKExample > Create > CorridorItems > Complex Alignment
CreateAlignment()
The user places multiple data points and a complex horizontal alignment is created which contains multiple straight lines.
ManagedSDKExample > Create > CorridorItems > Corridor
CreateCorridor()
The user selects a horizontal alignment which contains an active profile, and the command creates a corridor.
ManagedSDKExample > Create > CorridorItems > SetFeatureDefinition
SetFeatureDefinition()
The user selects a horizontal alignment and a feature definition, which is then applied to the alignment.
ManagedSDKExample > Create > CorridorItems > Profile
CreateProfile()
The user selects a horizontal alignment for which to create a vertical alignment. The user is prompted for a constant elevation and a feature definition, and a vertical alignment is created using these values.
ManagedSDKExample > Report > Corridors
ReportAllCorridors()
Generates a report of all corridor components including:
ManagedSDKExample > Create > HorizontalAlignments
ManagedSDKExample > Create > HorizontalAlignments > Line
CreateAlignmentFromPoints()
The user selects a feature definition and name, places data points, and then right-clicks to complete the command which creates a complex horizontal alignment with the given information. Both key-ins above call the same function.
ManagedSDKExample > Report > HorizontalAlignments
ReportAllAlignments()
Reads all alignments and reports information based on the element types in each one. Data reported for each element type can be found in the same file inside the AlignmentPropertyReader class in the ReadLine(), ReadSpiral(), and ReadCircularArc() functions.
ManagedSDKExample > Report > HorizontalAlignments > AsAnnotation
AnnotateAllAlignments()
Reports the same information but displays it as annotations on the reported alignments. The functionality for displaying data this way is in the solution under \Utility\DataDisplayHelper.cs in the AnnotationHelper class.
ManagedSDKExample > Create > HorizontalAlignments > Curb Returns
CreateLinesFromPoints()
The user places four data points, representing two intersecting lines. The lines are offset by a specified radius to create the center of an arc. The arc is created from the given radius, and the command returns the beginning of the first line, the arc, and the end of the second line.
ManagedSDKExample > Create > HorizontalAlignments > PI Alignment
CreatePIAlignmentFromPoints()
The user is prompted to place points which are temporarily linked by a line. The user is also prompted for the arc radius, feature definition, start and end spiral lengths for the next angle. At the end of the command, a complex horizontal alignment is created from the data with a curve set at each PI.
ManagedSDKExample > Report > HorizontalAlignments > PickAlignment
OnDataButton()
This tool allows the user to select an alignment then generates a report on that alignment using the Horizontal Alignment Reporter (discussed earlier). This example illustrates how to get the cursor position and obtain a selected element.
ManagedSDKExample > Create > HorizontalAlignments > Spiral
CreateSpiralFromPoints()
The user places a single point and a spiral is created from that point.
ManagedSDKExample > Report > StationOffsetElevation
StationOffsetElevation()
Reads alignments and creates a report of the terrain elevations at an interval. The report includes:
ManagedSDKExample > Report > DrapeLineAtInterval
DrapeLineAtInterval()
Reads alignments and creates a report of the draped cross-section lines at given offsets and intervals. Report includes:
· File Name · Model Name · Active Terrain Name · Horizontal Alignment · Active Vertical Alignment |
· Station · Offset · Elevation · Easting · Northing |
ManagedSDKExample > Report > QQChecker
OnDataButton()
This tool allows the user to select an alignment then generates a report of the difference between the terrain and alignment elevations.
ManagedSDKExample > Create > VerticalAlignments
ManagedSDKExample > Create > VerticalAlignments > Line
CreateVerticalAlignment()
The user selects a horizontal alignment for which to create a complex vertical alignment. The user then places points within their chosen profile view, which are temporarily linked by a visible line. When the command ends, a complex vertical alignment is created from the points. Both key-ins above call the same function.
ManagedSDKExample > Report > StationElevations
StationElevationsReport()
Reads profiles and creates a report of stations and elevations at an interval. Report includes:
ManagedSDKExample > Report > ActiveStationElevation
ActiveStationElevationAtIntervalReport()
Reads active profiles and creates a report of stations and elevations at an interval, as well as cardinal points. Report includes:
ManagedSDKExample > Report > ProfileElements
ProfileElementReport()
Reads profiles and creates a report of profiles and their elements. Data reported depends on the element type – see the ReportProfileLine(), ReportProfileParabola(), and ReportProfilePoint() functions for details.
ManagedSDKExample > Create > VerticalAlignments > Parabola
CreateParabola()
The user selects a horizontal alignment with which to create a vertical alignment. The command then creates a vertical parabola with this alignment.
ManagedSDKExample > Create > VerticalAlignments > Complex Alignment
CreateComplexAlignment()
The user selects a horizontal alignment with which to create a vertical alignment. The command then creates a complex vertical alignment made of an entrance tangent, parabola, and exit tangent.
The Unmanaged SDK Example only provides one key-in command. This example reproduces the HorizontalAlignmentReport from the managed example, and is mainly provided as a framework for developing future unmanaged SDK projects should you choose to do so.
UnmanagedSDKExample > HorizontalAlignmentReport
GenerateReport()
Reads all alignments and reports information based on the element types in each one. Data reported for each element type can be found in the same file in the ReportLine(), ReportSpiral(), and ReportCircularArc() functions.