- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all! So I got this code I use to add a shared parameter as a project parameter. For now, its working properly. My doubt is with the "Visible" property of the ExternalDefinitionCreationOptions object. According to the API, this property is "True if the parameter is visible to the user, false if it is hidden and accesible only via the API. The default is true.". The thing is, no matter if I use opt.Visble = true or opt.Visible = false in this code, the parameter is always visible so I dont know what Im missing here. Any ideas? Thanks!
DefinitionFile ParametrosCompartidosArchivo = app.OpenSharedParameterFile();
DefinitionGroup GrupoParametrosCompartidos = ParametrosCompartidosArchivo.Groups.get_Item("GroupName");
ExternalDefinitionCreationOptions opt = new ExternalDefinitionCreationOptions("ParameterName", ParameterType.Text);
opt.Visible = false;
//or opt.Visible = true; same result
Parametro = GrupoParametrosCompartidos.Definitions.Create(opt);
using(Transaction t = new Transaction(doc))
{
t.Start("Crear parámetro compartido");
Binding EnlaceCategorias = app.Create.NewInstanceBinding(CatSet);
doc.ParameterBindings.Insert(Parametro, EnlaceCategorias, BuiltInParameterGroup.PG_VISIBILITY);
t.Commit();
}
Solved! Go to Solution.