# GetEndPointReference from Dynamo line (Exported from Revit)

**URL:** <https://forum.dynamobim.com/t/getendpointreference-from-dynamo-line-exported-from-revit/96823>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [January 3, 2024, 12:08pm UTC](https://forum.dynamobim.com/t/getendpointreference-from-dynamo-line-exported-from-revit/96823 "2024-01-03T12:08:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkeinys](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@dkeinys](https://forum.dynamobim.com/u/dkeinys)\
**Post date:** [January 3, 2024, 12:08pm UTC](https://forum.dynamobim.com/t/getendpointreference-from-dynamo-line-exported-from-revit/96823/1 "2024-01-03T12:08:18Z")

</div>

Hi All

Can any one direct me to right solution please.

All im trying to do is to get "GetEndPointReference(0) & GetEndPointReference(1) from line in dynamo.

I do extract room boundary lines using this node  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/d/ad84862cba2bc1dff6fafe07d1d13bb78188fa77.png)

Than i got Python to get refs from above as below

```auto
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

if isinstance(IN[0], list):
    lines = []
    for i in IN[0]:
        lines.append(UnwrapElement(i))
else:
    lines = [UnwrapElement(IN[0])]

crvs = []
ref = ReferenceArray()

for line in lines:
    crvs.append(line.ToRevitType(True))
for i in crvs:
    ref.Append(i.GetEndPointReference(0))
    ref.Append(i.GetEndPointReference(1))

OUT = crvs,ref

```

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/1/011aa54bfbe4544987e49a22caed41d7ca76a2df.png)

All i require is to get start & End points as Revit.DB.Reference fo it can be dimensioned to these points.

Thanks In advance

Regards

---

<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:** [January 3, 2024, 1:27pm UTC](https://forum.dynamobim.com/t/getendpointreference-from-dynamo-line-exported-from-revit/96823/2 "2024-01-03T13:27:54Z")

</div>

I assume you are using this method: [GetEndPointReference Method](https://www.revitapidocs.com/2024/5619a3fd-38e1-fb56-7286-2e5f33a3b2b8.htm)

Note the comments on return value (emphasis added):  
Reference to the point or a **null** reference ( Nothing in Visual Basic) **if reference cannot be obtained**.

You are pulling the curves from the room boundary in Dynamo which means the curve you’re referencing doesn’t have a source element as rooms don’t have native geometry and as such you cannot reference it. Said another way: you cannot dimension to a room, only the elements which define it.

Instead you’ll need to pull the walls which makes up the boundary, and get a reference to the face at the core boundary of each wall.

---

<div class="post-metadata">

**Author:** ![dkeinys](https://avatars.discourse-cdn.com/v4/letter/d/ecc23a/32.png) [@dkeinys](https://forum.dynamobim.com/u/dkeinys)\
**Post date:** [January 3, 2024, 4:50pm UTC](https://forum.dynamobim.com/t/getendpointreference-from-dynamo-line-exported-from-revit/96823/3 "2024-01-03T16:50:36Z")

</div>

Thanks For clarification @jacob.small
