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: 

Rotation in slope

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
nitinjambhale
821 Views, 3 Replies

Rotation in slope

Hello friends,

I m struggling to rotate a family in slope.

Please help.

 

Thanks.

-Nitin.

 

3 REPLIES 3
Message 2 of 4
SinghManish
in reply to: nitinjambhale

Dear Friend,

 

I am manish i am facing same problem in rotation of families.

 

while i am using

 

ElementTransformUtils.RotateElementDocument,Family Id, axis, Rotation Angle);

 

I am not Getting that

 

1. How to calculate Axis.

2. Rotation angle.

 

 

Manish Singh
Message 3 of 4
Joe.Ye
in reply to: nitinjambhale

 

 

Hi Nitin,

 

Here is a sample showing how to rotate an element.  

 

public void RotateColumn(Autodesk.Revit.DB.Document document, Autodesk.Revit.DB.Element element)
{
    XYZ point1 = new XYZ(10, 20, 0);
    XYZ point2 = new XYZ(10, 20, 30);
    // The axis should be a bound line.
    Line axis = document.Application.Create.NewLineBound(point1, point2);
    ElementTransformUtils.RotateElement(document, element.Id, axis, Math.PI / 3.0);
}

 

What's problem when rotate the sloped family? Please give more detailed information about what kind of element?   It is better to upload a very simple model to explain how to you want to rotate it. 

 

BTW, if you just want to rotate a sloped column, you can change the column's "Cross-Section Rotation"  parameter value to rotate the column.

 



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

HI joe

Thanks for the reply. Its working now. There was some misunderstanding.

Thanks.

 

-Nitin

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