Renaming Part of Existing Grids

Hi all, I am completely new to the platform and joined it in hope of getting the necessary help and guidance to complete my current and future task/projects in Dynamo.

First off let me start by giving you some background, I do not have al lot of experience with Dynamo as I only started using it about a month ago. The only formal training I had was LinkedIn learning and YouTube it helps but only to a certain point.

I am currently trying to do a simple task of renaming part of my projects existing grids to what the new project standard would be, the only thing I am trying to achieve is to change the prefix of the grid from BER22 to BEROD. I am at a point where I have gathered all the grid parameter info and replaced the prefix to the new one and I also isolated the vertical and horizontal grids into two separate lists but struggle to send that info back to Revit. I have tried a couple of different steps but non seems to work.

Please help! :disappointed:

I am attaching a images to show what I have done so far.

No need to separate horizontal from vertical (unless you need to do something else with the grids). Now that you have the new names you just need to use SetParameterByName to write that value back to the list of elements.

1 Like

I did not know that, thank you for the quick response. Really appreciate the help :+1:t4:

This is what I did the first time and dynamo gave me an error, after closing it and rerunning the script it worked perfectly.

I am going to try it again without the split. Thank you again!!

The problem with splitting horizontal and vertical is that you have to manually determine the indices of each when there’s actually no difference in naming convention. It also means you have to manually select the grids to rename in each group. It’s easier (and less likely to cause error) to just use the original list of elements that you already have.

1 Like

I am updating the script now to your suggestion. Thanks!

I guess the more nodes you have the more likely it is to give you an error or the more difficult it becomes to do fault finding.