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