I created a simple script attempting to place a number (by order of selection) in a set parameter for the elements selected. In this case I am renumbering a run of duct which includes multiple catagories; duct, duct fittings, & duct accessories.
Using the Springs.SelectElements(ordered) I am able to get a list of elements but when I use the Element.SetParameterValueByName node I get an error that says:
“Warning: Element.SetParameterByName operation failed.
The best overloaded method match for ‘Revit.Elements.InternalUtilities.ElementUtils.SetParameterValue(Autodesk.Revit.DB.Parameter, double)’ has some invalid arguments”
I first tried to use the node from Rhythm called Isolated Pick Model Elements(ordered), this would work except I am only able to select elements from one category. I need to have everything in the run of duct (duct, fittings, & accessories) numbered in order.
See screenshot of my dyn.
Apply Item Number to duct.dyn (14.0 KB)