Naming Error when running 'Create Sheets by Room' task

Create Sheets by Room

I have 23 rooms selected. If I do 1 at a time, it works, but trying to do all of them, I get the following error.

Autodesk.Revit.Exceptions.ArgumentException: Name cannot include prohibited characters. Parameter name: name at Autodesk.Revit.DB.Element.set_Name(String name) at EvolveLAB.Glyph.Revit.Commands.Sheets.SheetCreationCommand.MakeSheets(Document doc, IEnumerable1 sheetCreationSettings, Action1 updateProgressBar)

@rwilhoit My guess is that one or more of the rooms you have selected have a character used in their name that is now allowed to be used in a sheet name. Can you share a list of the room names with us?

Do you know if it works for all 23 rooms if you do it one by one?

I’ll look into creating a patch to filter out invalid characters when generating sheets from rooms, which could help resolve this.

I think you may be right. There are 3 rooms e.g. Microscopy: Nikona or similar. I wonder if that was the issue.

@rwilhoit I think you are correct, I tested renaming a view and including a ‘:’, and I got this error:

I’ll look into making a patch where all of the characters in the above error will get converted to hyphens or spaces or something.

Strange that it’s allowed in a room name, but not a sheet name. Perhaps because a room name is a parameter value, but a sheet name is something higher level, that’s shown in the project browser and stuff? Who knows!

1 Like

@rwilhoit

Reproducing the Error:

I was able to reproduce the error with by using the default ‘Create Sheets by Room’ task with a room named “Bed:abc”. Here’s a screenshot of what I saw in the Glyph status report tab:

The Fix:

I then added some code that will remove any of the prohibited characters from the room name, and replace them with a hyphen, and it seems to work.

In the screenshot below, you can see that the room named ‘Bed:abc’ products a sheet named ‘BED-ABC 3 ROOM’.


Note: The capitalization, and addition of the room number (3) and the “ROOM” word are all part of this task’s default naming scheme.

We were debating between replacing prohibited characters with a space or a hyphen, but we think it will be less confusing if we use hyphen, as the prohibited characters are typically used to denotate or separate something in the name, where as just replacing them with a space could loose the original organization or separation intent from the intended naming scheme. Please let me know if you have a different opinion though!

As a final test, I made the more prohibitive room name possible, and with this new update Glyph creates a floor plan view from that room without any errors, even though the final name is slightly strange:

Note: The same issue occurs when creating views, which this code update will also fix

Next Release

This fix will be released in our next Glyph update, which may be a bit delayed due to the holidays. I’ll reference this bug fix, as well as try to remember to post a link to that release in this thread, once it’s public!

Thanks again noticing and posting about this issue!

Thanks,

1 Like

I’ve updated the name of this tread, to better reflect the topic and help other users find it.

1 Like

@rwilhoit

FYI, @Miguel released an update today (v2.0.6.0) which includes a fix for this issue.

Feel free to check it out!

2 Likes