I am hoping to get some advice for this graph
What I am Trying to do:
Change the same project parameter in a number of Revit central files within a directory. Basically, I have hundreds of project files located in a specific directory that all have a “Text” project parameter in them for the Exposure Class of Concrete. I would like Dynamo to be able to open all of these files, change this parameter to a user input value, then save and close the file.
I am able to locate and open all files within the directory and successfully save them. This is evident by the time stamp on the file. I have been able to find the name of the parameter using a node from the “Clockwork” Package (Document.projectParameters), and filter it out.
Where it goes wrong:
There are two potential problem areas (that I see), the first is when I am trying to select the category from the documents. (Here I am using Genius Loci node “SelectByCategory from Document”). Sometimes this identifies the families and other times it won’t. The other problem area is when I try to actually change the parameter value. (Here I am using a node from the Rhythm package “Element.SetParameterByNameTypeOrInstance”). The error that I get is “Warning: Element.SetParameterByNameTypeOrInstance operation failed. Attempt to modify the model outside of transaction.”. Even when the elements are selected with the previous node, I still get the same error. It’s almost like I can’t access this information… Is this because they are opening in the background and are not the active file?
If anyone can provide any direction or insight into what I may be doing wrong or need to adjust, it would be greatly appreciated!
Thanks in advance.