Files
RevitSdkSamples/SDK/Structural Analysis SDK/Examples/Concrete/CodeCheckingConcreteExample/Engine/ObjectDataBase.cs
T
2019-09-11 14:43:53 +02:00

110 lines
3.7 KiB
C#

//
// (C) Copyright 2003-2013 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.CodeChecking.Engineering;
namespace CodeCheckingConcreteExample.Engine
{
/// <summary>
/// Represents a base of cref"ElementDataBase" or cref="SectionDataBase".
/// </summary>
public class ObjectDataBase
{
/// <summary>
/// Initializes a new instance of the ObjectDataBase object with list of parameters.
/// </summary>
/// <param name="elementId">Element identificator.</param>
/// <param name="elementCategory">Element category.</param>
/// <param name="elementMaterial">Element material.</param>
/// <param name="elementLabel">Element label.</param>
public ObjectDataBase(ElementId elementId,
Autodesk.Revit.DB.BuiltInCategory elementCategory,
StructuralAssetClass elementMaterial,
Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass elementLabel)
{
category = elementCategory;
material = elementMaterial;
elemId = new ElementId(elementId.IntegerValue); ;
label = elementLabel;
}
/// <summary>
/// Initializes a new instance of the ObjectDataBase from an existing one.
/// </summary>
/// <param name="data">Object data to copy</param>
public ObjectDataBase(ObjectDataBase data)
{
category = data.Category;
material = data.Material;
elemId = data.ElementId;
label = data.Label;
}
/// <summary>
/// Initializes a new instance of the ObjectDataBase.
/// </summary>
public ObjectDataBase() { }
/// <summary>
/// Gets the element's category.
/// </summary>
public Autodesk.Revit.DB.BuiltInCategory Category
{
get { return category; }
}
/// <summary>
/// Gets the element's material.
/// </summary>
public StructuralAssetClass Material
{
get { return material; }
}
/// <summary>
/// Gets the element's identificator.
/// </summary>
public ElementId ElementId
{
get { return elemId; }
}
/// <summary>
/// Gets the element's label schema.
/// </summary>
public Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass Label
{
get { return label; }
}
private Autodesk.Revit.DB.BuiltInCategory category;
private StructuralAssetClass material;
private ElementId elemId;
private Autodesk.Revit.DB.ExtensibleStorage.Framework.SchemaClass label;
}
}