# Data shapes select edges and revit edges

**URL:** <https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121>\
**Category:** Uncategorized\
**Created:** [April 3, 2022, 10:07pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121 "2022-04-03T22:07:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 3, 2022, 10:07pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/1 "2022-04-03T22:07:38Z")

</div>

Hi, I’m getting different lines returned between data shape select edges and Revit. Is there a way to incorporate revit select edges into data shapes so I can use it with dynamo player? Possibly another input into the python to add revit select curves? Or is there a different class or something I can call?  
@Mostafa_El_Ayoubi  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d4ab8fb3942fdb9937062a27efe07f1d75dedfe9.png)

```auto
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com

class uiselectedges():

    def __init__ (self,inputname,buttontext):
        self.inputname = inputname
        self.buttontext = buttontext

    def __repr__ (self):
        return 'UI.SelectEdges input'
        
x = uiselectedges(IN[0],IN[1])

OUT = x

```

```auto
	    def pickedges(self, sender, event):
			edges = []
			for c in self.Controls:
				c.Enabled = False	
			try:				
				seledge = uidoc.Selection.PickObjects(Selection.ObjectType.Edge,'')
				for s in seledge:
					e = uidoc.Document.GetElement(s).GetGeometryObjectFromReference(s).AsCurve().ToProtoType(True)
					e.Tags.AddTag("RevitFaceReference", s)
					edges.append(e)
				sender.Tag = edges
			except:
				pass
			for c in self.Controls:
				c.Enabled = True

```

[Topo\_Align Edges.dyn](https://forum.dynamobim.com/uploads/short-url/vZ4s1gBZvUD7eoErURPSty4j9FX.dyn) (91.9 KB)

---

<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:** [April 3, 2022, 11:50pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/2 "2022-04-03T23:50:50Z")

</div>

Can you post a simple RVT data set to reproduce, and a preview showing the discrepancy you are seeing?

---

<div class="post-metadata">

**Author:** ![vanman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vanman/32/20881_2.png) [@vanman](https://forum.dynamobim.com/u/vanman)\
**Post date:** [April 4, 2022, 12:55am UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/3 "2022-04-04T00:55:00Z")

</div>

I tried to reproduce it but it just seemed to work this time… Can we delete this post? 😑 Or if it ever pops up again I’ll post

---

<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:** [April 4, 2022, 1:50am UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/4 "2022-04-04T01:50:02Z")

</div>

Let’s leave it be so we can resume if needed… My guess is it has something to do with unit conversion in 2022, or a link instance incorrectly reporting the info.

---

<div class="post-metadata">

**Author:** ![stefan.oberholzer](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/stefan.oberholzer/32/39802_2.png) [@stefan.oberholzer](https://forum.dynamobim.com/u/stefan.oberholzer)\
**Post date:** [July 25, 2023, 11:48am UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/5 "2023-07-25T11:48:07Z")

</div>

@jacob.small, @Mostafa_El_Ayoubi

I’m experiencing a related issue with the Data-Shapes Edge Selection tool where it seems to be reporting the family instance’s origin point and not the in-project origin / coordinates.

Refer to the screenshots below;

 ![FamilyinProjectLocation_DynamoHighlight](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/f/2fc7fec34737bf0302c7f57499e989f768579a51.png)  
 ![FamilyLocation](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/6/a67435ae85e652438570315cd8567bb8d408f43e.png)  
[SampleFamily.rfa](https://forum.dynamobim.com/uploads/short-url/aboHhA8OH2OqiCvXkNQq7HYKMaX.rfa) (632 KB)

---

<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:** [July 25, 2023, 12:01pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/6 "2023-07-25T12:01:42Z")

</div>

If it is an error in the code then there is likely nothing I can do as I am not the owner of the datashapes package, but I’ll see if I can reproduce or find an easy fix if you start a new topic with the dataset and code to reproduce. Be sure you’re on a fully updated Revit and datashapes package version first though.

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [July 25, 2023, 12:15pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/7 "2023-07-25T12:15:49Z")

</div>

Thanks for reporting this @stefan.oberholzer .  
I’ll see what I can do and update this thread.

---

<div class="post-metadata">

**Author:** ![stefan.oberholzer](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/stefan.oberholzer/32/39802_2.png) [@stefan.oberholzer](https://forum.dynamobim.com/u/stefan.oberholzer)\
**Post date:** [July 25, 2023, 12:16pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/8 "2023-07-25T12:16:45Z")

</div>

@jacob.small

Thanks for the quick reply! For now, as a workaround, I’m doing a translation based on the family instance’s location and the edge curve.

@Mostafa_El_Ayoubi , thanks, you’re a legend!

---

<div class="post-metadata">

**Author:** ![Mostafa\_El\_Ayoubi](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mostafa_el_ayoubi/32/7815_2.png) [@Mostafa\_El\_Ayoubi](https://forum.dynamobim.com/u/Mostafa_El_Ayoubi)\
**Post date:** [July 25, 2023, 1:56pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/9 "2023-07-25T13:56:31Z")

</div>

I had a feeling I had already heard of this issue… It turns out that not only has it already been reported, someone by the name of Deniz Maral had even offered a fix (@Deniz_Maral I believe it’s you? 🙂 ) !  
I have not been able to merge the pull request because the package is not well maintained on github (I should fix that) and that’s why it didn’t make it to the version that’s in the package manager, but I’ve just implemented their code for surfaces and applied it to edges as well and pushed it. So thanks @Deniz_Maral haha 😃

v.2023.2.107 just published to the package manager.

---

<div class="post-metadata">

**Author:** ![stefan.oberholzer](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/stefan.oberholzer/32/39802_2.png) [@stefan.oberholzer](https://forum.dynamobim.com/u/stefan.oberholzer)\
**Post date:** [July 25, 2023, 10:59pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/10 "2023-07-25T22:59:23Z")

</div>

@Mostafa_El_Ayoubi ,

THANK YOU VERY MUCH!!! Problem sorted, if I ever see you in person, lunch is on me!!

Cheers

---

<div class="post-metadata">

**Author:** ![Deniz\_Maral](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/deniz_maral/32/80323_2.png) [@Deniz\_Maral](https://forum.dynamobim.com/u/Deniz_Maral)\
**Post date:** [July 31, 2023, 6:47pm UTC](https://forum.dynamobim.com/t/data-shapes-select-edges-and-revit-edges/75121/11 "2023-07-31T18:47:16Z")

</div>

Yeah, it was me 🙂
