How to locate a familyinstance based on line?

How to locate a familyinstance based on line?

哀家爆
Enthusiast Enthusiast
556 Views
3 Replies
Message 1 of 4

How to locate a familyinstance based on line?

哀家爆
Enthusiast
Enthusiast

I made a family based on line. When I try to locate a familyinstance in my project manually, Revit prompts me to first specify a sketch plane, and second prompt me to pick up two points to finish locating my familyinstance. My question is which function should I choose from the Document.NewFamilyInstance overload list?

According to my manual operation, I think I need a sketchplane and a line. But in the Document.NewFamilyInstance overload list, there isn't a method meeting my request.

I have also tried all the list methods which method parameters include line or curve as a workaround. 

I failed finally.

 

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

joshua.lumley
Advocate
Advocate

It is the second overload.

NewFamilyInstance(Line, FamilySymbol, View)

Add a line based detail family instance into the Autodesk Revit document, using an line and a view where the instance should be placed.
0 Likes
Message 3 of 4

哀家爆
Enthusiast
Enthusiast

it's not a detail family. the family is like the beam.

0 Likes
Message 4 of 4

RPTHOMAS108
Mentor
Mentor

Line based generic model is usually level based or workplane based and can usually be placed using:

 

NewFamilyInstance(Curve, FamilySymbol, Level, Structure.StructuralType.NonStructural)

 

(if it is non-structural)

 

Of the various non-view based overloads that accept a curve this is the only one that doesn't host the family on the face or a reference to a face.

 

The curve end points Z can be set to zero because it probably ignores them i.e. unlike structural framing the generic model line based family can't have independent end offsets. You can use a global offset from level with BuiltInParameter.INSTANCE_FREE_HOST_OFFSET_PARAM but the thing is flat in terms of it's insertion.

 

If you elevated one end it will be by your own parametric means within the family and that will be relative to the level it is hosted on. Realistically you can only achieve this kind of effect by angle from horizontal and changing length of the member to simulate something similar to what you get with structural framing. If you try independent linear dimensions to each end from the level the relationship usually breaks down when those dimensions become equal.

 

If you need it on a non-level workplane (reference plane etc.) I believe you have to use:

NewFamilyInstance(XYZ, FamilySymbol,Element,StructuralType)

If that works you can then adjust the location line.

0 Likes