# Get project or survey coordinates of structural column/ any element

**URL:** <https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787>\
**Category:** Packages\
**Created:** [December 24, 2015, 3:46am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787 "2015-12-24T03:46:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 24, 2015, 3:46am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/1 "2015-12-24T03:46:01Z")

</div>

Can Any body help me out with python script to get project or survey coordinates of structural column/ any element.

I am new to Python scripting. Guidance towards basics of what i should look at would be appriciated, Thank you,

Regards

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [December 24, 2015, 4:16am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/2 "2015-12-24T04:16:15Z")

</div>

You could do that with nodes.

A quick example…

 ![20151224-6](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/9c78802d81c7b007afe3cefd4b210e0078de9c19.png)

&nbsp;

---

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 24, 2015, 4:31am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/3 "2015-12-24T04:31:07Z")

</div>

This is with respect to survey base point.

Meaning , if i change my project base point these values wont change. Do they …?

&nbsp;

---

<div class="post-metadata">

**Author:** ![Brendan\_Cassidy](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/brendan_cassidy/32/7685_2.png) [@Brendan\_Cassidy](https://forum.dynamobim.com/u/Brendan_Cassidy)\
**Post date:** [December 24, 2015, 7:25am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/4 "2015-12-24T07:25:07Z")

</div>

Within revit columns can be a point or a curve, depending on if they are/not a slanted column(see below images).

 ![Column Location Curve](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/8/886ed8627dc1fd71bc0663d01128691550cad71f.png) ![Column Location Point](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/6/6ba1da3d514810c19b0d199eaaa7c4e4fbccfa03.png)

If you get the solid centroid wouldn’t this Z value be half way up the element not the Z value that might be wanted if it is wanted.

To do this in python you would input the column elements into the python node then get its Location type, then do a filter between curve or point so you end up with two lists of elements depending on if they have a curve or a point.

For a curve you will then need to get both its start and end points. Once you have these points you should be able to get their point data and use the revit api transform command. This should then give you the world coordinates for that element.

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [December 24, 2015, 9:30am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/5 "2015-12-24T09:30:55Z")

</div>

You could extract _Element.Curves_ (but they’re not always available by default)

The _Start Point_ and _End Point_ can then be extracted.

 ![20151224-7](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/e/e9ccb69fbcfe8d515c156bdcf77f980165fcab02.png)

---

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 28, 2015, 2:03am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/6 "2015-12-28T02:03:59Z")

</div>

Hello Vikram,

Thank you for your response.

Here is what i am trying to do and stuck. Image below will help you understand my problem clearly.

 ![example](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/6/673e082d14e5a26d2e16cd7b17f597cbe82fb9cc.png) ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/d/d4edfbadfdb4d6cf1589791b71fcec5daeff2367.jpg)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [December 28, 2015, 5:10am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/7 "2015-12-28T05:10:18Z")

</div>

Try using the Column family provided below.

[Concrete-Rectangular-Column.rfa](http://dynamobim.org/wp-content/uploads/forum-assets/testingwaters/12/28/Concrete-Rectangular-Column.rfa)

![20151228-2](http://dynamobim.org/wp-content/uploads/forum-assets/testingwaters/12/28/20151228-2.png)

---

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 28, 2015, 8:07am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/8 "2015-12-28T08:07:26Z")

</div>

Hi Vikram,

These coordinates are according to survey base point in revit.

When we change project base point to zero these point does not update/change according to project base point.

I hope you got what i am trying to explain , Image in the above comment explains it.

Thank you,

&nbsp;

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [December 28, 2015, 8:41am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/9 "2015-12-28T08:41:20Z")

</div>

You could do so this way…

 ![20151228-4](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/1/1a87b94c0b98adb398e1614d0952b116ad78fa98.png)

---

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 29, 2015, 6:54am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/10 "2015-12-29T06:54:50Z")

</div>

Hello Vikram, Thank you soo much. That one solved my problem. This is what i was trying to do .

&nbsp;

![dynamo](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/0b34639e23a868d5b8b0e06902f2a78aead71484.png)

&nbsp;

Can i get it much simpler .

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [December 29, 2015, 10:33am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/11 "2015-12-29T10:33:08Z")

</div>

May not be simpler, but a lot more compact with Design Script

Files:[Columns.dyn](http://dynamobim.org/wp-content/uploads/forum-assets/testingwaters/12/29/Columns.dyn), [Columns.rvt](http://dynamobim.org/wp-content/uploads/forum-assets/testingwaters/12/29/Columns.rvt)

![20151229-4](http://dynamobim.org/wp-content/uploads/forum-assets/testingwaters/12/29/20151229-4.png)

---

<div class="post-metadata">

**Author:** ![Preetesh\_Magdum1](https://avatars.discourse-cdn.com/v4/letter/p/e274bd/32.png) [@Preetesh\_Magdum1](https://forum.dynamobim.com/u/Preetesh_Magdum1)\
**Post date:** [December 30, 2015, 4:56am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/12 "2015-12-30T04:56:00Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![Hien\_Ngoc\_Tran](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@Hien\_Ngoc\_Tran](https://forum.dynamobim.com/u/Hien_Ngoc_Tran)\
**Post date:** [March 5, 2016, 8:16pm UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/13 "2016-03-05T20:16:44Z")

</div>

How can i use method element.geometry in revit api in revit python shell ??? When i use that method the result return is not solid ??

selection = [doc.GetElement( elId ) for elId in **revit**.\<wbr /\>ActiveUIDocument.Selection.Get\<wbr /\>ElementIds()]  
for i in selection:  
print i.Geometry

result is : \<indexer# object at 0x000000000000002B\>

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [March 6, 2016, 12:58pm UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/14 "2016-03-06T12:58:09Z")

</div>

Interesting. Those points are relative to Survey Point or to Project Base Point?

![Coordinates](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/a/a8c3ada7764fa5228e7aaec76cf47e3687c9049c.png)

---

<div class="post-metadata">

**Author:** ![Hien\_Ngoc\_Tran](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@Hien\_Ngoc\_Tran](https://forum.dynamobim.com/u/Hien_Ngoc_Tran)\
**Post date:** [March 6, 2016, 8:10pm UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/15 "2016-03-06T20:10:33Z")

</div>

I think it depend on when you set the family spot coordinate base on Project base point or Survey Point. In the picture, i’m sure you make 2 option for family spot coordinate, because you set project base point and survey point is (0,0,0) that mean they must have same place, right ??

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [March 7, 2016, 11:43am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/16 "2016-03-07T11:43:07Z")

</div>

Yes, two types. But what i mean is if those coordinates are realtive to (0,0,0) a “new origin” in the same way like Spot Coordinates does.

Sorry, my English sucks.

---

<div class="post-metadata">

**Author:** ![Hien\_Ngoc\_Tran](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@Hien\_Ngoc\_Tran](https://forum.dynamobim.com/u/Hien_Ngoc_Tran)\
**Post date:** [March 7, 2016, 11:51pm UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/17 "2016-03-07T23:51:24Z")

</div>

When i get location of element, then i move project base point and survey point and get location again.

Why both 2 case have same result ? Although The tag spot coordinate changed in right coordinate.

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [March 8, 2016, 7:32pm UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/18 "2016-03-08T19:32:52Z")

</div>

I agree. But when you get the location with Dynamo, that location is always realtive to (0,0,0). I want to get the location relative to Project Base Point, like the Spot Coordinates does; taking the Project Base Point like the origin. Something like this:

![ProjectBasePoint](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/3/364af7d5163f934a6a30e891bfef95c543dbd264.png)

---

<div class="post-metadata">

**Author:** ![Hien\_Ngoc\_Tran](https://avatars.discourse-cdn.com/v4/letter/h/9de053/32.png) [@Hien\_Ngoc\_Tran](https://forum.dynamobim.com/u/Hien_Ngoc_Tran)\
**Post date:** [March 9, 2016, 7:05am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/19 "2016-03-09T07:05:05Z")

</div>

Yes, you right. I tested with my sample. The location properties of element return the position relative with Project location point when we start a project ( not Project base point) always is : (0,0,0).

If we want to get the location relative with survey point, we must transform origin point to survey point.

And if we want to get the location relative with project base point, we must make something like your code above : p.X - pbp.X

btw: in your code block, actually we don’t need check p.X with pbp.X which one bigger or smaller right ? just p.X - pbp.X to get the point relative with project base point.

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [March 9, 2016, 10:59am UTC](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787/20 "2016-03-09T10:59:31Z")

</div>

Right, hahaha.

Thanks

[Next page](https://forum.dynamobim.com/t/get-project-or-survey-coordinates-of-structural-column-any-element/2787.md?page=2)
