俄罗斯贵宾会-俄罗斯贵宾会官网
做最好的网站

【Revit API】创建共享参数【俄罗斯贵宾会】

话不多说,直接上代码

var app = doc.Application;
app.SharedParametersFilename = sharedParamFilePath;
DefinitionFile definitionFile = app.OpenSharedParameterFile();
var groups = definitionFile.Groups;
var matchedGroup = groups.FirstOrDefault();
var edco = new ExternalDefinitionCreationOptions("ParamName", ParameterType.Text);
var definition = matchedGroup.Definitions.Create(edco) as ExternalDefinition;

Binding binding = doc.Application.Create.NewTypeBinding(categorySet);
doc.ParameterBindings.Insert(definition, binding, BuiltInParameterGroup.Text);

 

本文由俄罗斯贵宾会发布于编程,转载请注明出处:【Revit API】创建共享参数【俄罗斯贵宾会】

您可能还会对下面的文章感兴趣: