Data shapes select edges and revit edges

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?

#Copyright (c) mostafa el ayoubi ,  2016
#Data-Shapes ,

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	
				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)
				sender.Tag = edges
			for c in self.Controls:
				c.Enabled = True

Topo_Align Edges.dyn (91.9 KB)

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

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

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.

1 Like