Copying Parameters from Room objects to Mass

Hi All,

I’ve created a 3D mass using room boundaries. Instead of using the Element.Geometry node to convert the room into a mass, I converted the room boundaries (Room.Boundaries) into a polyline curve (Polycurve.ByJoinedCurves). Then, I created a surface from this curve and applied a height offset to thicken the surface, forming the mass.

With this process, I am losing the link between room objects and the mass as mass is generated from polycurve and not from room itself, making it impossible to transfer room parameters (using Element.GetParametervaluebyName) to the mass (using Element.setParametervaluebyName).

Whenever I run the script, It successfully generate the 3D mass, but the attributes are not being copied and are coming up blank.

How do I reestablish the link between these Rooms & Mass so that my paramter values are also copied?

Note: I have same parameters available for both Rooms & Mass

We’d have to see your graph in action to know where the disconnect is happening. You may not have a “link” from Room to Mass, but you do have a link from Room to PolyCurve to Mass, so there’s still a reference between objects via the list structure.

We need to see the actual “data” in your graph. Pin all the node preview bubbles so we can see what’s going on. We also need to see the rooms you’re providing since that’s the connection you want to make to the resulting masses. You’ll have to maintain the room list in the same manner you maintain the polycurve list to keep them in parallel - i.e. if you filter the polycurves or resulting geometries, then you need to also filter the rooms.

Like I said, you need to make sure that any filtering or sorting of the geometry also happens to the room list so that they match. Right now, you create the boolean surfaces and then join them with the list of singular surfaces. This means that your list of surfaces no longer matches your list of rooms.

Yes it makes sense. Probably thats the reason my mass height for couple of rooms does not match with Room Heights. Could you suggest a way forward so that List of surface matches to list of rooms?

When you filter the polycurves into 1 or more than one loops you need to also filter the rooms by the same condition so that you have a list of rooms with a singular loop and rooms with multiple loops. When you boolean the multi-loop boundaries into a singular surface you need to add the list of rooms back in the same manner that you add the surfaces back to the list of surfaces. You need to maintain your two lists (rooms and geometries) in parallel. Each geometry in your list should be at the same index as the room that generated it.