Element Get Location

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.

Someone can help me?

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.

Can you show us the full script, its unclear from where you get those elements from ?

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).

Hi, thanks for the answers.
The spaces are all placed and there is not a room unplaced I think.

What is the area of the room at index 0?

I tried also to recreate all the spaces from the rooms. You can see that there are 541 rooms as 541 spaces, but the problem persist

Hi @mirko.maccaronello

Use Element.Location+ node from clockwork that should solve your issue.

Hi @Kulkul

Your solution is good because now there is not error but the problem is that the Space list is empty

Use node from archi-lab package for collecting rooms.

And also show values of Element.Location+:

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.


Hi @yamanyildirim
No, for that I normally use Space Naming Utility.
Now I want to assign the room parameter “FICHE” to the space parameter “CODE”.

oh now i understand it.
When i need to transfer some values from room to space i always use room number as a referance.

This is my way to transfer some datas from rooms to space.
Maybe this will help you or give you some ideas.

@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

In that case get the spaces from the points list of Element.Location+ node. Does that makes sense?

@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.

@kulkul Do you know how I can select the space by the point and not create it?

Can you set your lacing to Cross Product at “==” node and try again?

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.