- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I would like to create a List<string> with several strings corresponding to different parameter names of an element.
The elements in my Revit model have a few parameters (created with the Autodesk Classification Manager for Revit), which I would like to get, and add to the List<string> paramNames.
(Attached .png also shows the code)
List<string> paramNames = new List<string>(); foreach (Element e in elementSet) { ParameterSet parameters = e.GetParameters("Classification.Uniclass.Ss.Number", "Classification.Uniclass.EF.Number", "Classification.Uniclass.Ss.Description", "Classification.Uniclass.Pr.Number", "Classification.Uniclass.Pr.Description");
//GetParameters only takes one argument so I can't do it like I have been trying //How can I get more than one parameter to create a ParameterSet? foreach (Parameter parameter in parameters) { name = parameter.Definition.Name; if (!paramNames.Contains(name)) { paramNames.Add(name); } } } paramNames.Sort();
Any help would be appretiated!
Solved! Go to Solution.
Link copied