Application: CompoundStructure
Revit Platform: ALL
Revit Version: 2012.0
First Released For: 2012.0
Programming Language: C#
Skill Level: Medium
Category: Element
Type: ExternalCommand

Subject: CompoundStructure
Summary: This sample will demonstrate how to create a vertical CompoundStructure for walls.

Classes: 
Autodesk.Revit.UI.IExternalCommand
Autodesk.Revit.DB.Document
Autodesk.Revit.DB.Element
Autodesk.Revit.DB.Material
Autodesk.Revit.DB.ThermalAsset
Autodesk.Revit.DB.StructuralAsset
Autodesk.Revit.DB.CompoundStructure

Project Files: 
Command.cs
This file contains a class which implement IExternalCommand interface. 
The WallCompoundStructure command allows creating vertical CompoundStructure and applying to walls.

Description: 
The sample utilizes the method GetCompoundStructure and SetCompoundStructure to get and set the CompoundStructure of walls. It also utilizes the methods SetLayers, SetNumberOfShellLayers, SetParticipatesInWrapping, GetSegmentIds, GetAdjacentRegions, GetSegmentEndPoints, SplitRegion, FindEnclosingRegionAndSegments, AddWallSweep of CompoundStructure class to set layers, get segments, split regions, add wall sweeps and reveals.

This sample also demonstrates the ThermalAsset and StructuralAsset classes and how to apply them to materials that can be used in compound structure layers as well as how to set which layer in a compound structure is used in structural analysis.

Instructions: 
1.	Start Revit.
2.	In order to use the commands, user should open “CompoundStructure.rvt“ in the folder, or manually create a project document and draw a wall.
3.	Select at least one wall, and then launch “Create CompoundStructure for wall” via the external command menu. 
4.  A vertical CompoundStructure will create and apply to the wall. You can check the CompoundStructure from its wall type.