# Element Get Location

**URL:** <https://forum.dynamobim.com/t/element-get-location/25431>\
**Category:** Revit\
**Created:** [August 31, 2018, 4:00pm UTC](https://forum.dynamobim.com/t/element-get-location/25431 "2018-08-31T16:00:02Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [August 31, 2018, 4:00pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/1 "2018-08-31T16:00:03Z")

</div>

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?

 ![Element%20Get%20Location](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/6/66fbbf13685e5daae3a77567281944adff6cdde8.jpeg)

---

<div class="post-metadata">

**Author:** ![HossZamani](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosszamani/32/43041_2.png) [@HossZamani](https://forum.dynamobim.com/u/HossZamani)\
**Post date:** [September 1, 2018, 1:49pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/2 "2018-09-01T13:49:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Arun\_Prakash](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/arun_prakash/32/89820_2.png) [@Arun\_Prakash](https://forum.dynamobim.com/u/Arun_Prakash)\
**Post date:** [September 1, 2018, 4:36pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/3 "2018-09-01T16:36:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 1, 2018, 4:43pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/4 "2018-09-01T16:43:31Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 3, 2018, 12:41pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/5 "2018-09-03T12:41:42Z")

</div>

![Element%20Get%20Location](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c2c1ecc84315377b220572cb936a06412faad48.jpeg)  
Hi, thanks for the answers.  
The spaces are all placed and there is not a room unplaced I think.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 3, 2018, 12:51pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/6 "2018-09-03T12:51:40Z")

</div>

What is the area of the room at index 0?

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 3, 2018, 1:00pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/7 "2018-09-03T13:00:06Z")

</div>

![Element%20Get%20Location%202](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/b/bb5c5f55b31022688532f919e2b10bff0438471e.jpeg)  
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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [September 3, 2018, 1:13pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/8 "2018-09-03T13:13:58Z")

</div>

Hi @mirko.maccaronello

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

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/c/bcec301ea4509ad6520959cd1ba2cb5733847f23.png)

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 3, 2018, 1:30pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/9 "2018-09-03T13:30:06Z")

</div>

Hi @Kulkul

 ![Element%20Get%20Location%203](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c76a6bce38b6248b44feba9cf35bbd1634af79e9.jpeg)  
Your solution is good because now there is not error but the problem is that the Space list is empty

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [September 3, 2018, 1:37pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/10 "2018-09-03T13:37:13Z")

</div>

Use node from archi-lab package for collecting rooms.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/7/e759c5e75f5c4380adf92241632ee7e00ca87569.jpeg)

And also show values of Element.Location+:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/4/04c5a62b55cc10a1a5ead20bafbc79a1c8348421.jpeg)

---

<div class="post-metadata">

**Author:** ![yamanyildirim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yamanyildirim/32/52682_2.png) [@yamanyildirim](https://forum.dynamobim.com/u/yamanyildirim)\
**Post date:** [September 3, 2018, 1:53pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/11 "2018-09-03T13:53:54Z")

</div>

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.

![spaceprop](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d0e1fd61eef5ed7f47db8536da14664031c14dfb.png)

 ![space%20to%20room](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/a/eaa6110a8633e9aab130da1d9f63609642de0db2.png)

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 3, 2018, 2:15pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/12 "2018-09-03T14:15:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yamanyildirim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yamanyildirim/32/52682_2.png) [@yamanyildirim](https://forum.dynamobim.com/u/yamanyildirim)\
**Post date:** [September 4, 2018, 7:24am UTC](https://forum.dynamobim.com/t/element-get-location/25431/13 "2018-09-04T07:24:59Z")

</div>

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.

 ![space%20for%20room](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/a/5a5bf7d93b4d13fad546d1e48f55a546e86ec233.png)

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 4, 2018, 8:08am UTC](https://forum.dynamobim.com/t/element-get-location/25431/14 "2018-09-04T08:08:59Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [September 4, 2018, 8:13am UTC](https://forum.dynamobim.com/t/element-get-location/25431/15 "2018-09-04T08:13:49Z")

</div>

> [@mirko.maccaronello](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 4, 2018, 12:07pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/16 "2018-09-04T12:07:58Z")

</div>

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

 ![Element%20Get%20Location%204](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/f/5f9dc7f18c8c51de7ec557d6f2ec98c8c9b22c4b.jpeg)

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 4, 2018, 12:25pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/17 "2018-09-04T12:25:17Z")

</div>

![Element%20Get%20Location%205](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aa970f7505b789e9846b570f11497a61d981c731.jpeg)  
@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.

---

<div class="post-metadata">

**Author:** ![mirko.maccaronello](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mirko.maccaronello](https://forum.dynamobim.com/u/mirko.maccaronello)\
**Post date:** [September 4, 2018, 12:29pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/18 "2018-09-04T12:29:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![yamanyildirim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yamanyildirim/32/52682_2.png) [@yamanyildirim](https://forum.dynamobim.com/u/yamanyildirim)\
**Post date:** [September 4, 2018, 2:22pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/19 "2018-09-04T14:22:29Z")

</div>

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

 ![Lacing%20to%20cross](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/d/dd36ace0e4d609001ece99668f76811edeb9c6ff.png)

---

<div class="post-metadata">

**Author:** ![yamanyildirim](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yamanyildirim/32/52682_2.png) [@yamanyildirim](https://forum.dynamobim.com/u/yamanyildirim)\
**Post date:** [September 4, 2018, 3:29pm UTC](https://forum.dynamobim.com/t/element-get-location/25431/20 "2018-09-04T15:29:05Z")

</div>

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.

 ![space%20point](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/5/e5802c0a6cc5ce0a195205b1e22c016d8e59df31.png)
