Runtime Error when creating a FamilyInstance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello
I am creating a FamilyInstance that is very similar to a pipe, ie, is a cylinder with a start and end point. I am using the function NewFamilyInstance(Line, FamilySymbol, View).
My Problem: When I create my FamilyInstance using the aforementioned function I get a runtime error: "This method is only applicable for the curve based family".
Some background information; I am running my addin in revit 2013 and my addin is compiled using Revit 2013 DLL's (RevitAPI & RevitAPIUI). The family/family symbol I am loading is pretty much the following family that has been expanded: C:\ProgramData\Autodesk\RVT 2014\Libraries\Australia\Structural Framing\Steel\Robobat Specific\Pipes.rfa
Do you know what is going wrong and how I can successfully create my FamilyInstance (that is very similar to a pipe). Note I need to specify the FamilyInstances's strart and end points which is why I am using this specific NewFamilyInstance function version.
Line pipeGeom = doc.Application.Create.NewLine(strt, end, false); FamilyInstance pipe = doc.Create.NewFamilyInstance(pipeGeom, pipeSymbol, uiDoc.ActiveView); // Error occurs here