I wanted to know if there already is a feature in PO (if so, sorry for the question, but so far I didn’t find any commands) to automatically rename PO Rooms.
I try to explain better what I mean. When making a PO Room the sofware automatically name it (Room 1, Room 2, Room n), and it is necessary for the user to rename it (accordingly to design documents or anything) room by room. This may be very time consuming in large models, so I was wondering if there is a way to automatically rename the Rooms (from a csv file maybe?), which would make much faster the modelling.
As an example, I know that in IES-VE each room is automatically named accordingly to the text reported in the dxf file when it is extruded.
Thank you very much.
If you can share with me your code I’ll try to edit it according to my naming convention.
I’m not really an expert in coding so I’ll probably ask for your help.
Hi @micheledimartino below is the code for the component that creates the new names, let me know if there is something I can help with in terms of editing the code
if _model:
_model.duplicate()
rooms = [room for room in _model.rooms]
counts = {}
for i, room in enumerate(rooms):
if room.display_name in counts:
counts[room.display_name] += 1
rooms[i].display_name = "{}{}".format(room.display_name +'-', counts[room.display_name])
else:
counts[room.display_name] = 1
room.display_name = "{}{}".format(room.display_name +'-', counts[room.display_name])
for room in _model.rooms:
room.display_name = room.display_name + "{}".format('_L-'+room.story)
for room in _model.rooms:
print(room.display_name)
model_ = _model
Good point! How would you imagine the CSV file to work? Will you use add an x, y, z value to the CSV file for each name for mapping the names to the room geometries?
What is the format of the design document that you get? Would a similar DXF approach work? We can probably give that approach a try to find the names and use it to rename the rooms based on the insertion point of the text.
Usually when modelling in IES-VE (in most cases for LEED modelling) I re-draw rooms with polyline and I type the room name inside the polyline, then I import the dxf file in IES-VE and extrude the polylines. IES automatically assign the name of the room to extruded volume.
Do you think a similar approach is possible in Pollination? Would it be possible to include something like that in one of next releases?
As I said, I think it would be much faster for large project instead of renaming each room one by one.
Thank you for the additional information. If you are willing to type the names, I can think of two different solutions:
If @mingbo agrees, we can add a new command to the Rhino plugin to allow you select the room and set the name. We can call it PO_SetDisplayName or something similar to that.
We can also use Grasshopper to create a workflow that matches the texts in the document with the rooms and assign them to the rooms.
I’m very glad to hear that! Thank you for letting me know that it is a useful approach. I’m tagging @mingbo here to see if he thinks this approach still deserves its own Rhino command. Many VE users have mentioned this feature to me before as something that they like about the VE DXF import workflow.
I should also correct what I said here.
We already have a command that does something similar to this for setting up the display name from the command line. It is called PO_ResetDisplayName. Just ensure you set the options correctly before setting up the name and only set the Room to Yes.
Let us know what you think about this command in comparison to the one that makes you type the names inside Rhino. Also, in case you didn’t know there are commands to show/hide the display names of the rooms in the Rhino plugin.