Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
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: 

Assembly Transformation

1 REPLY 1
SOLVED
Reply
Message 1 of 2
scottbaldy
625 Views, 1 Reply

Assembly Transformation

I would like to orient an assembly to the “main” member in the assembly.  I am able to get the basis and origin of the “main” member in the assembly and also the assembly itself.  I have not been able to identify the most efficient method to achieve this re-orientation. 

 

ElementTransformUtils.RotateElement(document, element.Id, axis, rotation)

RotateElement method appears to be one approach, but seems to be a bit tedious with determining each axis and then rotating about each axis.

 

Since I have the basis that the assembly needs to be transformed to, is there an easy way to simply set the assembly basis to the new basis?

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: scottbaldy

Dear Scott,

 

Thank you for your query.

 

RotateElement is the generic way to reorient elements in Revit.

 

I think you can also achieve the same result, possibly with more freedom of choice and orientation, by setting the Element.Location property.

 

That might avoid some of the multiple rotations and translations otherwise required.

 

I hope this helps.

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Rail Community


Autodesk Design & Make Report