using System.Collections.Generic;
using System.ComponentModel;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Mechanical;
using ConstructionType = Autodesk.Revit.DB.Analysis.ConstructionType;
namespace Revit.SDK.Samples.ProjectInfo.CS
{
///
/// Wrapper class for MEPBuildingConstruction
///
public class MEPBuildingConstructionWrapper : IWrapper
{
#region Fields
///
/// MEPBuildingConstruction
///
private MEPBuildingConstruction m_mEPBuildingConstruction;
#endregion
#region Constructors
///
/// Initializes private variables.
///
/// MEPBuildingConstruction
public MEPBuildingConstructionWrapper(MEPBuildingConstruction mEPBuildingConstruction)
{
m_mEPBuildingConstruction = mEPBuildingConstruction;
}
#endregion
#region Properties
///
/// Gets or sets Roofs
///
[DisplayName("Roofs")]
public ConstructionWrapper Roof
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Roof));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Roof, value.Handle as Construction);
}
}
///
/// Gets or sets Exterior Walls
///
[DisplayName("Exterior Walls")]
public ConstructionWrapper ExteriorWall
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWall));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWall, value.Handle as Construction);
}
}
///
/// Gets or sets Interior Walls
///
[DisplayName("Interior Walls")]
public ConstructionWrapper InteriorWall
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.InteriorWall));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.InteriorWall, value.Handle as Construction);
}
}
///
/// Gets or sets Ceilings
///
[DisplayName("Ceilings")]
public ConstructionWrapper Ceiling
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Ceiling));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Ceiling, value.Handle as Construction);
}
}
///
/// Gets or sets Doors
///
[DisplayName("Doors")]
public ConstructionWrapper Door
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Door));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Door, value.Handle as Construction);
}
}
///
/// Gets or sets Slabs
///
[DisplayName("Slabs")]
public ConstructionWrapper Slab
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Slab));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Slab, value.Handle as Construction);
}
}
///
/// Gets or sets Floors
///
[DisplayName("Floors")]
public ConstructionWrapper Floor
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Floor));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Floor, value.Handle as Construction);
}
}
///
/// Gets or sets Exterior Windows
///
[DisplayName("Exterior Windows")]
public ConstructionWrapper ExteriorWindow
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWindow));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWindow, value.Handle as Construction);
}
}
///
/// Gets or sets Interior Windows
///
[DisplayName("Interior Windows")]
public ConstructionWrapper InteriorWindow
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.ExteriorWindow));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.ExteriorWindow, value.Handle as Construction);
}
}
///
/// Gets or sets Skylights
///
[DisplayName("Skylights")]
public ConstructionWrapper Skylight
{
get
{
return new ConstructionWrapper(m_mEPBuildingConstruction.GetBuildingConstruction(ConstructionType.Skylight));
}
set
{
m_mEPBuildingConstruction.SetBuildingConstruction(ConstructionType.Skylight, value.Handle as Construction);
}
}
#region IWrapper Members
///
/// Gets the handle object.
///
[Browsable(false)]
public object Handle
{
get
{
return m_mEPBuildingConstruction;
}
}
///
/// Gets the name of the handle.
///
[Browsable(false)]
public string Name
{
get
{
return m_mEPBuildingConstruction.Name;
}
set
{
m_mEPBuildingConstruction.Name = value;
}
}
#endregion
#endregion
#region Methods
///
/// Get constructions
///
/// ConstructionType
/// Related Constructions specified by constructionTypes
public ICollection GetConstructions(ConstructionType constructionType)
{
return m_mEPBuildingConstruction.GetConstructions(constructionType);
}
#endregion
}
}