- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am trying to clean the shared parameters that are in our office project template. This a quite old template that was in the office before I joined.
Using the Revit Lool Up plugin I have seen that many of these parameters have an INVALID value in the ParameterGroup inside the definition. Is it safe to assume that these parameters are no longer used and delete them?
I have used the code below to get a list of parameters that have INVALID group:
public void GetInvalidGroupSharedParameters()
{
Document doc = this.ActiveUIDocument.Document;
FilteredElementCollector collector = new FilteredElementCollector(doc);
collector.OfClass(typeof(SharedParameterElement));
string listofparameters = "Invalid group parameters: \n";
foreach (SharedParameterElement e in collector)
{
Definition def = e.GetDefinition();
if(def.ParameterGroup== BuiltInParameterGroup.INVALID) listofparameters += def.Name + Environment.NewLine;
}
TaskDialog.Show("test",listofparameters);
}
With this, I get a quite big list of parameters that I don't recognize and there are even duplicates.
Do you think this is a good approach to find no longer used Shared Parameters? Do you have any alternative suggestions to do this?
Many thanks in advance.
Solved! Go to Solution.