给我一段revit生成柱子的C#代码
时间: 2023-03-12 13:58:22 浏览: 94
在Revit中,可以使用以下代码来生成柱子:Document doc = uidoc.Document;FamilySymbol columnSymbol = new FilteredElementCollector(doc) .OfClass(typeof(FamilySymbol)) .WhereElementIsElementType() .Cast<FamilySymbol>() .FirstOrDefault(s => s.Family.Name == "Column");// Create the columnLocationPoint point = new XYZ(0, 0, 0);Level level = new FilteredElementCollector(doc).OfClass(typeof(Level)).Cast<Level>().FirstOrDefault(l => l.Name == "Level 1");if (columnSymbol != null) {FamilyInstance column = doc.Create.NewFamilyInstance(point, columnSymbol, level, StructuralType.NonStructural);}
相关问题
给我一段revit中生成柱子的代码
答:在Revit中生成柱子的代码示例如下:Document doc = this.ActiveUIDocument.Document;// Create a new family instance of a column
FamilyInstance column = doc.Create.NewFamilyInstance(new XYZ(0, 0, 0), doc.FamilyLibrary.get_Item("Column"), StructuralType.Column);// Set the parameters of the column
column.Symbol.LookupParameter("Width").Set(1.2);
column.Symbol.LookupParameter("Height").Set(3.5);
给我一段revit生成你好的C#语言代码
你好!我可以为您生成一段revit代码:DIMENSIONAL STYLE:STANDARD; LAYER:"Text"; ROTATION:45; FONT:"Arial"; SIZE:12; TEXT:"你好!";
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)