Hi everyone,
I am trying to replace a character within a Sheet Number string from multiple Revit documents. However, the ‘ʳʰʸᵗʰᵐ|Elements.SetParameterValueByNameCaSeiNSeNSiTiVe’ node results in the replaced string appearing as ‘null’. Has anyone else encountered a similar issue, or is there a way to solve this?
DYN004_VIEWS & SHEETS RENAME_V2.dyn (49.1 KB)
@amir.hafriz
you can do a simple code block:
# 🎯 replace null
x == null ? "no sheet number" : x
the rest you can pass
What does the error say? Are you sure you have the right list structure and list levels for your inputs? Why not use the default out of the box node Element.SetParameterByName
?
This is the error that appears:
I did try to use the default node. But it resulting to a null list.
@amir.hafriz
check also your list depth… …mybe flatten or @L2
I didn’t notice that you were modifying multiple documents at once. Dynamo typically only modifies the document in which you ran the application. In order to modify other open documents, you have to use nodes that allow you to specify the document or use python and the API to specify the document yourself.
Bird Tools’ Dynamo Multiplayer is likely the fastest path forward. Write the graph to work on the active project, then use multiplayer to process all the files. Bird Tools | Dynamo Multiplayer
1 Like
Noted that. Thanks for sharing @jacob.small . Will have a look into this. Btw no harm in any way, perhaps I may not be well versed. Is this coming from a reliable source?
@Draxl_Andreas Tried flatten the list. Appear the same results
Quite - from one of the most well known and forward thinking Revit add-in developers, and as you can see available on the Autodesk App Store.
Seems like a straightforward fix.
I have used the bird tool workflow before and it’s really useful and simple.
The script needs to be optimized first though.
- just create a script with Core nodes replacing the string and setparam based on a single file.
- there are no need to consider multiple documents for the scripting logic and no need for transaction end post the setparam node.
- run birdtools, select the models and select the script to run.