Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating a Reference Plane and Associating Elements to it

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
3084 Views, 3 Replies

Creating a Reference Plane and Associating Elements to it

Hi,

 

When creating a new sloping structural framing beam FamilyInstance I currently set its Revit level and assign the Start/End Level Offset parameters. This work just fine.

 

However, take for example an entire sloping system of beams. This is much better control by a sloping reference plane set as the work plane of the elements. Changing the slope of the entire system then becomes a lot easier.

 

The question is can I create a named reference plane through the API, and following this can I use NewFamilyInstance to associate the FamilyInstance to set its work plane to the reference plane? I notice one of the overloads to NewFamilyIsntance is 

NewFamilyInstance(XYZ location, FamilySymbol symbol, Element host, Level level, StructuralType structuralType)

Could the 'Element host' possibly be the refenece plane? 

 

 

Finally if I latter wish to change the slope of the reference plane is this possible through the API?

 

Sorry for so many questions, but for me they are all related to my choice of possibly using this method.

 

Any guidance would be much appreciated.

3 REPLIES 3
Message 2 of 4
Joe.Ye
in reply to: Anonymous


Hello,

>>>The question is can I create a named reference plane through the API?
Yes, you can create a named reference plane by NewReferencePlane() or NewReferencePlane2() method.

>>>can I use NewFamilyInstance to associate the FamilyInstance to set its work plane to the reference plane?
Yes, you can set the work plane to the reference plane via API. See this article for details. http://adndevblog.typepad.com/aec/2012/07/creating-active-work-plane-of-the-view-using-revit-api.htm...

>>>Could the 'Element host' possibly be the refenece plane?
Yes, it can be the reference plane.

>>>Finally if I latter wish to change the slope of the reference plane is this possible through the API?
No, Revit reference plane's angle cannot be changed. After it is created, the Reference plane angle cannot be changed.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 4
atzetona
in reply to: Joe.Ye

">>>Finally if I latter wish to change the slope of the reference plane is this possible through the API?
No, Revit reference plane's angle cannot be changed. After it is created, the Reference plane angle cannot be changed."

 

 

It is possible by " ElementTransformUtils.RotateElement" command.

 

It was a big surprise for me but it worked.

 

Example:

"

ElementTransformUtils.RotateElement(doc, eleId, exis, 3 * Math.PI / 180);

 

"

Message 4 of 4
bcampbell11
in reply to: atzetona

what about associating an existing beam to an existing reference plane?

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community