成立分享参数

话不多说,直接上代码

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

 

本文由星彩网app下载发布于计算机编程,转载请注明出处:成立分享参数

TAG标签: 星彩网app下载
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。