Hi - just starting out on Dynamo and would like to run a script to select all elements on a particular level and move them to another level. I know this will have some limitations (like rooms, wall hosted elements etc) but would like to do what can be done.
I know my first run at the script won’t work since there are various parameters that need to be changed (level, base constraint, base level etc). How would I go about filtering out elements that don’t have the parameter I need to change?
Thanks. The filtering works great however why wouldn’t element.setparameter act on every element selected? Also, when I undo the action in Revit and run the script again I get a different result with different elements changing level. The warnings I get are all for trying to change read-only parameters which is understandable.
Not sure why it’s affecting different elements every time. Tho you can filter elements with read-only parameters with the “Element.ParameterIsReadOnly” node from the Clockwork package.
Thanks for that. I can’t get my head around how to use the ParameterIsReadOnly node. Whether I use it with a list of elements or a single instance it always returns an empty list for me. I’m assuming this is the root cause of the other elements not changing level correctly. I’ve pulled it out of the rest of the script just to try to get it working at this stage. It works great with the Base Constraint and Base Level parameters.
Thank you so much for your help so far. I’ve done what you suggested and on the face of it I get the correctly filtered list but when I run I still end up with errors saying i’m trying to change a read only value and it won’t change every element in the list.
Hi Michael, I’m not sure why the floor element is failing - it’s the only type that should work without a hitch. Doors and windows will give you an error as you guessed at the start. Just a shot in the dark here but one possibility is that when dynamo tries to process a door/window and gets interrupted by an unknown error the “parameter is read-only” debug message is returned by mistake?