top of page

Automatic Room Tag leaders

Hi there, fellow Revit users!


Also you, like many other friends and colleagues of mine, are surprised by the "new" Revit 2023 feature of automatically adding a Room Tag leader every time that you move a room? And also you are looking for a way to revert back to this new setting?


Luckily is an easy fix, here is the official link from Autodesk: Automatic leaders are added to tags when moving rooms in Revit (autodesk.com)


 

As more than one person reached out with the same question, today I'm going to share with you a new script that I wrote to automatically activate the setting "DisableRoomAreaSpaceAutomaticLeader" in your Revit.ini files, in other words, to add the below line of text after the "[Misc]" setting.

DisableRoomAreaSpaceAutomaticLeader=1

We know how it can be tedious to manually edit the Revit.ini files for each computer and that's why we support with this script that does it for you in a second!



The script is written in Python and uses the pyRevit to be directly reachable from your Revit interface. It works by finding all the Revit.ini files in your system and modifying (or adding) the line that controls the "DisableRoomAreaSpaceAutomaticLeader" setting. It is compatible with Revit 2019 and later versions.


How to

To use the script, you need to have pyRevit installed and loaded in your Revit session, as well as the pyM4B extension. Here you can find more about pyM4B, in case you haven't already installed it. After that, you can run the script from the pyM4B tab in Revit. You will see a message box that confirms the success or failure of the operation, listing the file path of all the INI files edited by the function.


Below you can find the updated look of our pyM4B tab 🚀


 

Curiosity 🐍

Editing the Revit.ini file in Python can be more complex than expected. This is because it does not have a header and therefore the classic Python module configparser will fail to .read(file).

In order to workaround this, we had to treat the Revit.ini file as it was a "simple" text file, reading it as text in encoding "utf-16", the first line, which if opened in NotePad looks empty, contains in fact special characters.

 

I hope you find this script useful and it saves you some time and hassle. Let me know what you think in the comments below.


Happy Reviting, Cheers!

175 views0 comments

Recent Posts

See All

Comments


bottom of page