首先要创建一个Pipe,就需要看Pipe有哪些创建的方法

Revit二次开发——创建Pipe

由于我是需要在已知的两个XYZ创建管,所以选择了第三个方法   Create(Document document, ElementId systemTypeId, ElementId pipeTypeId, ElementId levelId, XYZ startPoint, XYZ endPoint);

参数说明:

接下来分别对几个参数进行创建

Document document:commandData.Application.ActiveUIDocument.Document。

ElementId systemTypeId:Revit二次开发——创建Pipe

ElementId pipeTypeId:ElementId Pipe_id = document_0.GetDefaultElementTypeId(ElementTypeGroup.PipeType);

ElementId levelId:(遍历找到当前项目中的所有标高,然后再foreach里面判断得到某一标高的id)

Revit二次开发——创建Pipe

创建管道:

Revit二次开发——创建Pipe

相关文章:

  • 2021-06-09
  • 2022-12-23
  • 2021-11-27
  • 2021-04-24
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2021-10-07
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案