直接上代码

作者: 编程  发布:2019-11-21

话不多说,直接上代码

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);

 

本文由9159.com发布于编程,转载请注明出处:直接上代码

关键词:

上一篇:没有了
下一篇:没有了