Hi all,
I have a problem with the node Element get location.
I have select all the rooms from the Architectural model and now I want , with this node, select all the existing spaces from the room’s points.
This is the error: Warning: Element.GetLocation operation failed. The location of the structural element is not a valid curve.
It’s strange because I used the same script some month ago without problems.
What category are you feeding to the Element.GetFromLinkedFile node? If it’s spaces I suspect that those spaces are not placed. You can select those elements in the linked file by their elementId to check what is going on.
My guess: there is an unplaced room somewhere in the selection. Try filtering out rooms where the area isn’t greater than 0 ( !> is the node for this test).
As i understand you are just planing to get room name/number and set it to the spaces.
If you placed your spaces correctly Revit catch the Room number.
And there is a parameter at space elements which gıve you room number/name.
@Kulkul This script works perfectly but creates all the spaces from the rooms, in my case the spaces are instead existing because I don’t want lose all the spaces parameters
@yamanyildirim. I have a different number of rooms and spaces (591 and 481) and the list is automatically sorted by ID, so as you can only see 5 times the “Number” parameter is the same.
@Kulkul this is the script as you said, it’s perfect to use it at the beginning of the project to create the spaces from the rooms, but now I just have to transfer the parameter from the rooms to the space.
You can use SpaceAtPoint from MEPover package.
I also set point z poisition a little bit higher. It will leave you on the safe side.
Also add Object.IsNull because your room and space numbers are not equal. This will clear the rooms that not in your spaces.