仅提供English版本
Today I found a quite interesting class searching the API: FamilyInstanceCreationData
By passing parameters, you can use doc.Create.NewFamilyInstances2() to generate all components at once.
This class can be used for modeling or adjusting components. The method comes with two methods. .axis && .RotateAngle can save the steps of using ElementTransformUtils.RotateElement() after generating components before. It is more concise at call level than generating one by one before. The time difference has not been tested yet. Below is the example in official documentation.
1 | ICollection<ElementId> BatchCreateColumns(Autodesk.Revit.DB.Document document, Level level) |
Author: Broccoli
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles

2020-11-11
Revit Export DWGExportSetting

2020-04-17
Revit二次开发 将构件信息导入到数据库中
2020-07-02
revit Secondary Development Idling&ExternalEvent
2021-06-08
Revit PromptForFamilyInstancePlacementOptions Family Placement API

2021-01-05
Revit Left Right Value Coding Storage Hierarchical Tree Structure Design

2021-09-14
QT+ CLion + Revit Issues Summary