Application: StructuralLayerFunction
Revit product and version: All
Last Modified: 19/12/2006
Modified By: JJ Autodesk HSL
Programming Language: C#

Subject:  This sample demonstrates how to retrieve the function of each structural layer of selected floor in order from outside to inside in a dialog box.

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.ElementSet
Autodesk.Revit.Structural.CompoundStructureLayer
Autodesk.Revit.Structural.Enum.CompoundStructureLayerFunction

Project Files: 
Command.cs
This file contains the class Command which inherits from IExternalCommand interface and implements the Execute method; besides, the class implements the functionalities: get all functions from all structure layers of selected floor.

StructuralLayerFunctionForm.cs
This file contains a form class which will list all the functions for all floor’s structure layers.

Description: 
This sample uses Autodesk.Revit.Structural.CompoundStructureLayer and Autodesk.Revit.Structural.Enum.CompoundStructureLayerFunction mostly to get all the layer functions of Floor.
-	To get all the Structure layers of floor, use Floor.FloorType.CompoundStructure.Layers property.
-	To get the function of one layer, use Function property of CompoundStructureLayer class.
-	The layers of the floor are ordered from outside to inside in the structural layers object.

Instructions: 
1.	Draw one floor in Revit, then edit the floor’s Structure parameter, afterward, insert some layers and select different functions for each layers.
2.	Select the floor then run the command, a dialog will pop up, all available functions of the selected floor’s structure layers will be listed in the ListBox control.