Python Revit Element to Dynamo

my python script created a list of lines, startpoints, endpoints…

whenever i try to convert any of my lines this is my result:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “<string>”, line 105, in <module>
AttributeError: ‘Line’ object has no attribute ‘ToDSType’

trying to forward startpoints and endpoints to dynamo in oder to create lines there after flattening my list (using: Line.ByStartPointEndPoint)

the error is:
Warning: One or more of the input types are not matching, please check that the right variable types are being passed to the inputs. Couldn’t find a version of ByStartPointEndPoint that takes arguments of type (__array,__array).

what am i missing???

 

test

possible to see the python code?

I believe you want to use :

dynamoGeometry = revitGeometryObject.ToProtoType()

 

 

Michael, indeed.

i successfully created lines and whatever I try I fail…

version 1:

plane=app.Create.NewPlane(norm,startpt)
sketchplane=SketchPlane.Create(doc,plane)

line=Line.CreateBound(startpt, endpt)
elemID=line.Id
outlist.append(doc.GetElement(line.Id).ToDSType(True))

I even tried this:

de- and reconstructing my points in order to process them in dynamo

here i failed again. the points are no points dynamo can process.

 

stx=float(startpt.X)
sty=float(startpt.Y)
stz=float(startpt.Z)
enx=float(startpt.X)
eny=float(startpt.Y)
enz=float(startpt.Z)
newstartpt=XYZ(stx,sty,stz)
newendpt=XYZ(enx,eny,enz)
tmplist.append((newstartpt,newendpt))

…seems to be to late for my brains tonight…

thanks michael i got you…working as sugested!