PropertySetElementGetStructuralAsset Method |
Gets a copy of the StructuralAsset.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic StructuralAsset GetStructuralAsset()
Public Function GetStructuralAsset As StructuralAsset
public:
StructuralAsset^ GetStructuralAsset()
member GetStructuralAsset : unit -> StructuralAsset
Return Value
StructuralAsset
Exampleprivate void ReadMaterialProps(Document document, Material material)
{
ElementId strucAssetId = material.StructuralAssetId;
if (strucAssetId != ElementId.InvalidElementId)
{
PropertySetElement pse = document.GetElement(strucAssetId) as PropertySetElement;
if (pse != null)
{
StructuralAsset asset = pse.GetStructuralAsset();
if (asset.Behavior == StructuralBehavior.Isotropic)
{
StructuralAssetClass assetClass = asset.StructuralAssetClass;
double poisson = asset.PoissonRatio.X;
double youngMod = asset.YoungModulus.X;
double thermCoeff = asset.ThermalExpansionCoefficient.X;
double unitweight = asset.Density;
double shearMod = asset.ShearModulus.X;
if (assetClass == StructuralAssetClass.Metal)
{
double dMinStress = asset.MinimumYieldStress;
}
else if (assetClass == StructuralAssetClass.Concrete)
{
double dConcComp = asset.ConcreteCompression;
}
}
}
}
}
See Also