When creating grids in Revit, Revit will name/number them in the order that they were created based on the naming convention last used. If you haven’t been consistent in your creation of grids, you’ll more than likely need to rename them. This can prove problematic as Revit will not allow you to have two grids identically named. If you try, Revit will return an error saying, “the name entered is already in use. Enter a unique name.” As a workaround, it is necessary to rename the grids temporarily before naming them as intended.
To speed up this process, I have developed two custom nodes available in the Parametric Monkey Dynamo package:
‘Grid.RenameAlphanumerical‘ will rename grids alphanumerically from A to ZZ, excluding “I” and “O” as per convention.
‘Grid.RenameNumerical‘ will rename grids from 01 to 99.
The sortAxis input requires a string, either “X” or “Y”, which relates to the axis the grids are sorted along. This affords flexibility in deciding which values (alphanumerical or numerical) you want to run from left to right, and bottom to top. The tempPrefix input is a string which can be used if other grids are currently using the same mark value. The toggle will update the temporary mark values to the final mark values.
It doesnt works… just says null…
That’s a really unhelpful comment. Care to share some more info about your issue? Revit and Dynamo version would be useful as too a screenshot.
Revit 2018 Dynamo Version 220.127.116.116
I try with another package and also says null… what i am doing wrong…
Hi David. It is working for me with BVN v1.4.6. I suspect the problem is because you are using Spanish. The node is trying to update the “Name” parameter of the grid. You’ll need to edit the node and modify this so that it has the correct spanish parameter. Let me know if this works.
Hi, it’s great.
But, how to change direction of renaming (alphabetical one)? From top to bottom?
Hi Ana. I have just updated (v1.4.7) both nodes to include a boolean if you want to reverse the numbering sequence. Give this a try. It should solve your problem.
Great script, it’s worked wonders for me. Our office convention is to have grids numbered 1, rather than 01. How would you modify the script to achieve this? I looked around in the custom node but nothing jumps out at me as a solution. Also curious how you programmed the I’s and O’s out of it. Thanks!
If you want to remove the digit padding so that it goes 1, 2, 3 etc. you’ll need to modify the Grid.renameNumerical node as follows.
For the Grid.renameAlphanumerical node, this is how we eliminate the “O” and “I”s in the range.
Our Dynamo Package tools have some updated capabilities and have also been updated to Dynamo 2.x. But these are paid tools.
Let me know if you need an additional help.
Very helpful comment I see now how you were adding the 0’s to the numerical grids and eliminating the I’s & O’s in the alphanumerical grids. Also good to know about the paid tools, I couldn’t find any information regarding pricing and I’d be interested in additional details.
I find with some projects when I run this Dynamo graph I get the error in Revit “The name entered is already in use. Enter a unique name.” Some aspect of the temporary renaming must not be working but I have a poor understanding of that part of the graph. Any insight you may have into resolving this issue would be greatly appreciated.
The prices aren’t published on the website. If you would like more information, please send me an email.
If you are getting that error it means there is a grid already with that name. Change the temporary prefix to something else which isn’t in use (like ‘fjfhghgh’) and then re-run.
hI, I am using this custom package and i’ve made it a part of the dynamo player. I’ve created a script where I not only rename gridlines but I also create gridlines using the GridByStartPointEndPoint node.The problem i’m having is that whenever I run the scrip through Dynamo player, it creates new grid lines instead of just updating the old ones and adding the new additional grids and changing the spacing, etc.
Any solution for this?
I’ve posted this on https://forum.dynamobim.com/t/creating-grid-lines-renaming-them-with-dynamo-player/44783
The issue is due to ‘element binding’ and is a core function of Dynamo. I’ve responded to your forum post with more info.
I was reviewing the package and found that has dependencies on other packages which are 2018 versions. Is there any update on your package “ParametricMonkey” so it can run Clockwork and Achi-lab in 2019 versions?
Hi Horacio. The package was written on Dynamo 1.3 and I’m not sure if we’ll update it to Dynamo 2. However, if you want to use later versions of the dependencies you can (you just need to download/install differently). But I haven’t tested the updated versions.
Wonderfull! Funcion 100% in the version Dy 2.xx
Your work for me great.
and to start the J to X grid I will write the code block. “J”, “k”. and what is appreciated in DYNAMO PLAYER?
I don’t understand your question. Are you wanting to start the naming sequence from ‘J’?
If you want to use in Dynamo Player just define the graph as above and set the inputs to be ‘is input’ by right-clicking on them. Then they will be exposed in Dynamo Player.
Here I leave my doubt in 3 images
That is, although I edit the NODE made by you, and generate the “String” of the sequence and I do it “IsIMPUT” it does not appear in Dynamo Player
OK so the problem is you shouldn’t be exiting the custom node. This should stay as is. The inputs you need to set as ‘isInput’ are the other nodes which I renamed – prefix, sort axis, etc. These are just OOTB nodes which have been renamed and set to be the Dynamo player inputs. Does that make sense?
Sorry but I am a beginner on dynamo and I do not succeed to run this script ? Could you tell me how I can find the 5 blocks on the left of the image ?
I have set up :
Select model Elements
Code block : “X” (or “Y”)
Code block : “_”
Sorry for the confusion. These are default nodes that have been renamed. The ones you describe are OK. Just use a string (text) node instead of the Code Block – It’s not critical but will be required if you want to use Dynamo Player.
No worries, I am a beginner.
It does not work even with the good blocks. Any idea ?
Lien vers mon image
Hi Adrien. I suspect the problem is because you are using French. The node is trying to update the “Name” parameter of the grid. You’ll need to edit the custom node and modify this so that it has the correct French parameter. Let me know if this works.
It is working, I just changed “name” by “nom”. You are so kind to have answered to my questions !
Hamid Hussain Mohammed
Hey is there any way to name the grids by a letter and followed by a number (ex: A1, A2, A3…).
I’d appreciate your help.
Yes you could achieve this without altering the custom node. You would first do exactly as the article: run with a random prefix and then run without the prefix. This will get the sequence right. You then just need to run again but this time the temp prefix would be “A”.
I hope that helps.
I am new user in dynamo and i want to download this script from whom or can you send it to my email
As per the tutorial, the custom node is available via the Parametric Monkey package. You can download it from the Dynamo Package Manager.
Waldemar Estrada CArrasquillo
I am new to Dynamo and I like to make this work for me. What is the node default name “Grids to be rename” Before you change the rename it. thank you for your help in advance
It’s ‘Select Model Elements’
Thank you for getting back w/ me. I have another question. How can I make the numerical start w/ single digit number ex, 1,2, 3, 4.
Once again Thank you.
You can’t. It is hardcoded to 2 digits, eg 01.
Waldemar Estrada Carrasquillo
Do you know if there is another way to make this single digit or if there is way to have both options?
Yes there is a way, but it involves modifying the script and removing the string padding. To do this, right-click on the node and modify it.