How to new a line based generic model on Work Plane

How to new a line based generic model on Work Plane

Anonymous
Not applicable
1,600 Views
9 Replies
Message 1 of 10

How to new a line based generic model on Work Plane

Anonymous
Not applicable

Hi, Everyone

I Place Line Based Generic Model (Fireproof for Structural Pipe Member, Attached Rfa File) along Vertical Brace, (See Attached Image)

 

I think REVIT API Function NewFamilyInstance used for this case will help user and saving time, I have define Scketch Plane (Work Plane)

how to transfer the Plane to Reference for the function ?

 

Could you help , I am very appreciated ?

 

Lee, Wenhan

 

public FamilyInstance NewFamilyInstance(
	Reference reference,
	Line position,
	FamilySymbol symbol
)
0 Likes
Accepted solutions (1)
1,601 Views
9 Replies
Replies (9)
Message 2 of 10

Aaron.Lu
Autodesk
Autodesk
Dear ctci,
I don't think the plane can be used as reference here, because this function needs a reference to a face, the plan can't be a face.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 10

Aaron.Lu
Autodesk
Autodesk
I looked at this twice, it is possible.

either using Selection.PickObject api or using Element.get_Geometry to get the face, remember to set ComputeReferences to true of the options argument.

get_Geometry (ActiveView, ComputeReferences = true)

it will return a solid with one face in it, this should be the face you want to use, so Face.Reference will be the argument to use in NewFamilyInstance method.



Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 4 of 10

Anonymous
Not applicable

Dear Lu,

    If the H Shape Steel, I can get Planar Face to Place Lined Base Model (Fire Proof),

But for Pipe Steel, No Planar Face to Place.

   

    Because by Hand, I can Place Lined Base Model on Elevation Work Plane (see attached image),

So I think Place by API is possible,

 

Lee, Wenhan

0 Likes
Message 5 of 10

Aaron.Lu
Autodesk
Autodesk
Yes, It is possible, did you try the way in my last reply?


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 6 of 10

Anonymous
Not applicable

Dear Lu,

    If the element with planar face, your solution is OK (Sample attached),

but the pipe steel without planar face, so I can't place line based model along it

I think Place on Elevation(Grid) Work Plane is possible solution, do you agree with it ?

0 Likes
Message 7 of 10

Aaron.Lu
Autodesk
Autodesk
Sorry, I'm not very clear about your requirement, because seems Grid is only a 2D element which is not a plane. could you please attach a .rvt file with the family instance placed at the position you want?

I just tried to place your .rfa file in the current workplane via API.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 8 of 10

Anonymous
Not applicable

Dear Lu,

    Attached RVT File for you, Please ref attached picture, Set Work Plane on Grid 2, Place Component on Work Plane By Pick Line

If OK, Could you show me how to work by REVIT API.

 

Thank you for your kindli help.

 

Lee, Wen Han

0 Likes
Message 9 of 10

Aaron.Lu
Autodesk
Autodesk
Accepted solution
It's true that it is impossible to do so via API.
I tried all the available NewFamilyInstance methods.

so I filed change request.


Aaron Lu
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 10 of 10

Anonymous
Not applicable

Dear Lu,

    I try by your instrument, This element be placed on Plan, it can not align the line on the elevation view.

 

Lee, Wenhan

0 Likes