Runtime Error using Line.CreateBound

Runtime Error using Line.CreateBound

Anonymous
Not applicable
598 Views
3 Replies
Message 1 of 4

Runtime Error using Line.CreateBound

Anonymous
Not applicable

Hello

 

I am trying to create a Line in my Addin. When I run my code in that creates a line using the static function 'Line.CreateBound()' I get a runtime error. The error is:

 

Method not found 'Autodesk.Revit.DB.Line Autodesk.Revit.DB.Line.CreateBound(Autodesk.Revit.DB.XYZ, Autodesk.Revit.DB.XYZ)'.

 

Note the error occurs at runtime and not compile time. What is going wrong and how can I fix this?

 

Line pipeGeom = Line.CreateBound(strt, end); // error occurs here. Note strt and end are not null and are valid points
FamilyInstance pipe = doc.Create.NewFamilyInstance(pipeGeom, pipeSymbol, uiDoc.ActiveView);

 

0 Likes
599 Views
3 Replies
Replies (3)
Message 2 of 4

ollikat
Collaborator
Collaborator

Hi

Seems to me that you have built your add-in with newer Revit API than the Revit where you are running your add-in. The function you mentioned came to API a release or two ago.

0 Likes
Message 3 of 4

Anonymous
Not applicable

Thanks for your reply 🙂 I think I have compiled the Addin using Revit 2013 or 2014. I am running the addin in Revit 2013 in a MEP project.

 

If Line.CreateBound() is not present in 2013 do you know how I create a line in 2013??

0 Likes
Message 4 of 4

ollikat
Collaborator
Collaborator
Yes...CreateBound() came in 2014.

I think we were using Document.Application.Create.NewLine() before new funtion(s).
0 Likes