Application: StairsAutomation
Revit Platform: Architecture
Revit Version: 2013.0
First Released For: 2013.0
Programming Language: C#
Skill Level: Medium
Category: Elements
Type: ExternalCommand

Subject: Stairs creation
Summary: 
A utility sample that creates a series of stairs, stairs runs and stairs landings configurations based upon predefined rules and parameters.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Architecture.Stairs
Autodesk.Revit.DB.Architecture.StairsRun
Autodesk.Revit.DB.Architecture.StairsLanding
Autodesk.Revit.DB.Architecture.StairsEditScope

Project Files: 
•	Command.cs - contains the class Command which inherits from interface IExternalCommand and implements the Execute method.
•	StairsAutomationUtility.cs - The main class governing the automatic stairs element creation.
•	IStairsConfiguration.cs - This interface represents a configuration of stairs runs and landings to be created.
•	StairsConfiguration.cs - A specific implementation of IStairsConfiguration with some default storage included.
•	StairsSingleStraightRun.cs - A stairs configuration representing a single straight run.
•	StairsSingleCurvedRun.cs - A stairs component consisting of a single curved run.
•	StairsSingleSketchedStraightRun.cs - A stairs run consisting of a single sketched straight run.
•	StairsSingleSketchedCurvedRun.cs - A stairs configuration that represents a single curved run (which will be made in Revit as a sketched run).
•	StairsStandardConfiguration.cs - Represents a stairs configuration consisting of straight runs and rectangular landings.  The runs will switch based upon the input parameters.  The landings width can be adjusted independently.
•	GeometryUtils.cs - Geometric utilities used by this sample.
•	RunComponents/IStairsRunComponent.cs - The base interface for a single stairs run.
•	RunComponents /TransformedStairsComponent.cs - An abstract base class for stairs components which can be moved via a translation and rotation.
•	RunComponents /StraightStairsRunComponent.cs - A stairs run consisting of a linear straight run.
•	RunComponents /CurvedStairsRunComponent.cs - A stairs component consisting of a single curved run.
•	RunComponents /SketchedStraightStairsRunComponent.cs - A stairs run consisting of a single sketched straight run.
•	RunComponents /SketchedCurvedStairsRunComponent.cs - A stairs run consisting of a single sketched curved run.
•	LandingComponents /IStairsLandingComponent.cs - An interface that represents a landing.
•	LandingComponents/StairsRectangleLandingConfiguration.cs - A configuration for creation of a landing with a fixed cross section.
•	LandingComponents/LandingComponentUtils.cs - Utilities used in processing of landings.

Description: 
This sample provides following:
•	An example for how to create and populate stairs elements.
o	Use of StairsEditMode
o	Creation of standard stairs runs 
o	Creation of sketched stairs runs
o	Creation of sketched landings
•	An extensible structure demonstrating how runs and landings creation can be combined into different stairs configurations

Instructions: 
Open Revit and open the sample document.  Execute the command.  Each time the command is run a different predefined stairs configuration is created.  

1.	Single straight stairs run		
2.	Stairs/landing combination up to level 2		
3.	Multi-span stairs/landing combination up to level 3		
4.	Single curved stairs run		
5.	Curve stairs run > 360 degrees