Application: StructuralLayerFunction
Revit Platform: All
Revit Version: 2009.0
First Released For: 9.0
Last Modified: 3/5/2008
Modified By: JJ Autodesk
Programming Language: C#
Skill Level: Beginning
Category: Database
Type: ExternalCommand

Subject: Function retrieval for structural layers.
Summary: 
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.
3.	Under sample project folder of SlabProperties, there is one Revit model file named SlabProperties.rvt, this file contains several structural layers, you can open this file and select the existing floor to run this sample.