Is app.Create.Newline() missing from the namespace?

I’m trying to create a new line so that I can rotate a FamilyInstance about it. Looking around online at sources like BuildingCoders’ Python Handout it appears that it should be possible to create the line like so:

BoundLine = app.Create.NewLine(startPoint, endPoint, True)

But I am getting an error that Application does not have NewLine. Looking at the app.Create namespace in Python it does indeed appear to be missing (others such as NewPlane mentioned in the handout linked above are present though):

I am defining app like so:

uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

Has anyone else run into this or have any tips on how to create a line? The line object would need to be compatible with the FamilyInstance.Location.Rotate() function, unless there is another way of rotating a family instance about a given axis…

There’s no such method in the api. If you want to create a new line by two XYZs use Line.CreateBound(XYZ, XYZ)

@DHewett that hand out is from 2012. API has changed quite a bit since then :slight_smile:
Here is the method @Thomas_Mahon described:
http://www.revitapidocs.com/2017/7885bdf9-3007-ea60-af6b-a96ac7672c18.htm