问:
如何使用API在项目中添加项目参数?Revit操作界面如下:

在SDK中一个例子CreateShared 介绍了如何创建共享参数,不知道如何创建项目参数(Project Parameter)?
答:
在项目文档(Project document)中,我们无法用API来创建Project Parameter。 用API只能创建共享参数。
如果是在族文档(Family document)中,可以用API创建Project Parameter的。方法是通过FamilyManager.AddParameter() 方法。
AddParameter(String, BuiltInParameterGroup, Category, Boolean) Add a new family type parameter to control the type of a nested family within another family.
AddParameter(String, BuiltInParameterGroup, ParameterType, Boolean) Add a new family parameter with a given name.

本文解答了如何在Revit项目文档中使用API创建项目参数的问题。由于直接创建不可行,文章提供了在族文档中创建的方法,即通过FamilyManager.AddParameter()方法实现。
1787

被折叠的 条评论
为什么被折叠?



