
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I created a routine to create a shared parameter (param1), I need to associate this parameter to the railing category but does not show the category associated with the parameter, I bear this code:
Autodesk.Revit.ApplicationServices.Application app = (Autodesk.Revit.ApplicationServices.Application)sender;
Document doc = e.Document;
DefinitionFile sharedParametersFile = OpenSharedParamFile(app);
DefinitionGroup eBIMgroup = OpenGroup(sharedParametersFile);
Definition definition = OpenDefinition(eBIMgroup);
Category Railings = doc.Settings.Categories.get_Item(BuiltInCategory.OST_Railings)
ategorySet categoryset = app.Create.NewCategorySet();
categoryset.Insert(Railings);
Transaction tran = new Transaction(doc, "Parametro");
tran.Start();
Autodesk.Revit.DB.Binding binding = app.Create.NewInstanceBinding(categoryset);
doc.ParameterBindings.Insert(definition, binding, BuiltInParameterGroup.PG_TEXT);
tran.Commit();
when I write code "BuiltInCategory." Several options appear which is correct?
Tranks, I hope you can help me!
Solved! Go to Solution.