Application: Loads
Revit Platform: Structure
Revit Version: 2009.0
First Released For: 9.0
Last Modified: 02/26/2008
Modified By: JL Autodesk
Programming Language: C#
Skill Level: Medium
Category: Database
Type: ExternalCommand

Subject: Operate Load Case, Load Nature, Load Usage and Load Combination.
Summary: 
This sample shows how to operate Load Case, Load Nature, Load Usage and Load Combination.

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Elements.LoadCase
Autodesk.Revit.Elements.LoadNature
Autodesk.Revit.Elements.LoadCombination
Autodesk.Revit.Creation.Document

Project Files:
Loads.cs
There is a class named Loads which implements the IExternalCommand interface. This file uses the other files to show how to operate Load Case, Load Nature, Load Usage and Load Combination.

LoadCaseDeal.cs
This file contains the functions to operate the Load Case and Load Nature.

LoadCombinationDeal.cs
This file contains the functions to operate the Load Combination and Load Usage.

LoadCaseTabPage.cs
This UserControl is used to deal with the operation of load case on the form.

LoadCombinationTabPage:
This UserControl is used to deal with the operation of load combination on the form.

Description: 
Functionalities:
-	Get all the load cases, load natures, load combinations, load usages, and formulas in a Revit project.
-	Present all existing Load Cases in current project including their names, case numbers, natures, and categories; Modify name, nature and category. Then allow users to “Duplicate” a new Load Case into current project, meanwhile displaying them on the dialog.
-	Show all the load natures (including the existing natures in current project already and the added natures), which name can be modified, and an “Add” button allow to add a new one.
-	Add new Load Combination into current project and set its parameters such as load cases and load usages in creation. 
-	Delete certain Load Combination or Load usage.
Implementation:
-	New load case and new load combination can be created by using NewLoadCase () and NewLoadCombination () methods in namespace Autodesk.Revit.Creation.
-	New load nature and load usage can be created by using NewLoadNature () and NewLoadUsage () method in namespace Autodesk.Revit.Creation.
-	The load case element can be retrieved from a Load Instance object using the parameter named “Load Case”.
-	All the load natures, load cases, load combinations and load usages can be found by iterating through the document elements.
-	All objects have a Name property can be used to retrieve a user visible name.

Instructions: 
1.	Run the command, it will show all the load cases, load natures, load combinations, load usage, and formulas in Revit project. Using Revit Menu Command “Setting->Structural Setting“can open a similar dialog.
2.	Select a Load Case then you can duplicate a new Load Case in Load Cases Tab Page.
3.	Select a Load Nature then you can add a new Load Nature in Load Cases Tab Page.
4.	You can create a new Load or delete Combination in the Load Combination Tab Page by using the “Add” or “Delete” buttons. You can also add or delete Load Combination Usage.