VB.net 2010 视频教程 VB.net 2010 视频教程 python基础视频教程
SQL Server 2008 视频教程 c#入门经典教程 Visual Basic从门到精通视频教程
当前位置:
首页 > Python基础教程 >
  • C#教程之【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);
复制代码


相关教程