Autodesk.Revit.DB.Structure.StructuralSections.StructuralSectionColdFormed是Revit API中用于描述冷弯型钢材料的结构截面的类。它是Autodesk.Revit.DB.Structure.StructuralSections.StructuralSectionNonRectangular类的子类。
ColdFormedSection是StructuralSectionColdFormed类的只读属性,表示结构截面的冷弯型钢材料。该属性返回一个ColdFormedSection对象。
ColdFormedSectionId是StructuralSectionColdFormed类的只读属性,表示结构截面所使用的冷弯型钢材料的ID。该属性返回一个整数值。
StructuralSectionColdFormed类没有任何公共方法。
以下代码示例展示了如何创建一个冷弯型钢材料的结构截面:
// 新建一个ColdFormedSection对象
ColdFormedSection coldFormedSection = new ColdFormedSection("C Channel", 100, 50, 4, 4, 4, 4);
// 获取冷弯型钢材料的ID
int coldFormedSectionId = coldFormedSection.GetColdFormedSectionId();
// 新建一个StructuralSectionColdFormed对象,并设置其ColdFormedSection属性
StructuralSectionColdFormed coldFormedStructuralSection = new StructuralSectionColdFormed();
coldFormedStructuralSection.ColdFormedSection = coldFormedSection;
以上代码中,我们首先创建了一个ColdFormedSection对象,该对象表示一个100x50x4x4x4x4的C形槽钢。然后我们获取该冷弯型钢材料的ID,并使用它创建一个StructuralSectionColdFormed对象。最后,我们将刚刚创建的ColdFormedSection对象赋值给StructuralSectionColdFormed对象的ColdFormedSection属性。
Autodesk.Revit.DB.Structure.StructuralSections.StructuralSectionColdFormed类提供了一种方便的方式来描述冷弯型钢材料的结构截面。它的ColdFormedSection属性可以返回一个表示冷弯型钢材料本身的ColdFormedSection对象,从而更加方便处理冷弯型钢材料的特殊情况。