https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-F0C7BA6A-8C58-45B4-8639-1E08CBC6781D-htm.html
private void ReadMaterialProps(Document document, Material material){ ElementId strucAssetId = material.StructuralAssetId; if (strucAssetId != ElementId.InvalidElementId) { PropertySetElement pse = document.GetElement(strucAssetId) asPropertySetElement; if (pse != null) { StructuralAsset asset = pse.GetStructuralAsset(); // Check the material behavior and only read if Isotropic if (asset.Behavior == StructuralBehavior.Isotropic) { // Get the class of material StructuralAssetClass assetClass = asset.StructuralAssetClass; // Get other material properties // Get other material properties double poisson = asset.PoissonRatio.X; double youngMod = asset.YoungModulus.X; double thermCoeff = asset.ThermalExpansionCoefficient.X; double unitweight = asset.Density; double shearMod = asset.ShearModulus.X; double dampingRatio = asset.DampingRatio; if (assetClass == StructuralAssetClass.Metal) { double dMinStress = asset.MinimumYieldStress; } elseif (assetClass == StructuralAssetClass.Concrete) { double dConcComp = asset.ConcreteCompression; } } } }}
联系客服