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

Subject: Create section views.
Summary: 
This sample shows how to generate a section view across the mid point of a linear element, such as a wall, floor or beam

Classes: 
Autodesk.Revit.IExternalCommand
Autodesk.Revit.Document
Autodesk.Revit.Geometry.BoundingBoxXYZ
Autodesk.Revit.Element
Autodesk.Revit.ElementSet
Autodesk.Revit.Elements.Wall
Autodesk.Revit.LocationCurve
Autodesk.Revit.Geometry.Line
Autodesk.Revit.Elements.FamilyInstance
Autodesk.Revit.Geometry.Transform
Autodesk.Revit.Structural.AnalyticalModel
Autodesk.Revit.Structural.AnalyticalModelFrame
Autodesk.Revit.Geometry.Curve
Autodesk.Revit.Elements.Floor
Autodesk.Revit.Structural.AnalyticalModelFloor

Project Files: 
Command.vb
It contains the class Command which implements interface IExternalCommand and the generating process of the section view across the mid point of a linear element. It also contains a class CreateDraftingView to create a drafting view.

XYZMath.cs
It gives operations about point and vector presented by XYZ structure.

Description: 
This sample provides following functionalities.
-	Retrieve the selected linear element.
-	Generate a BoundingBoxXYZ instance which will be used in NewViewSection() method
-	set its Max and Min property
-	Generate a Transform instance as the Transform property of BoundingBoxXYZ which defines the Origin and the directions (including RightDirection, UpDirection and ViewDirection) of the created view
-	Create the section view using the BoundingBoxXYZ.

Instructions: 
1.	Open Revit Structure 2009.
2.	Draw a linear element (wall, structural floor or structural beam).
3.	Select the element and execute the external command Command.
Or
1.	Open Revit 2009.
2.	Execute the external command CreateDraftingView.