Message 1 of 3
Rotate project North
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I want to rotate the project using the API like we can do using this button in Revit : Manage>Project location>Rotate project North. The result is a rotation of all 3D elements in the project.
I've found solutions about rotating the TrueNorth here but it's not the same method.
I've also tested the code bellow but it is similar to "specify coordinate at point" and do not modify the ProjectNorth, instead it change the coordinate of the Survey BasePoint and rotate it around the Project BasePoint :
//BasePoint pp = BuiltInCategory.OST_ProjectBasePoint, typeof(BasePoint);
//Rotate Project North
ProjectLocation plCurrent = doc.ActiveProjectLocation;
ProjectPosition newPosition = app.Create.NewProjectPosition(
pp.get_Parameter(BuiltInParameter.BASEPOINT_EASTWEST_PARAM).AsDouble(), //Keep this parameter value
pp.get_Parameter(BuiltInParameter.BASEPOINT_NORTHSOUTH_PARAM).AsDouble(), //Keep this parameter value
pp.get_Parameter(BuiltInParameter.BASEPOINT_ELEVATION_PARAM).AsDouble(), //Keep this parameter value
Math.PI/4); //angle
plCurrent.SetProjectPosition(pp.SharedPosition, newPosition);
Does anyone have a suggestion ? Where can I change the ProjectNorth angle using the API ?
Tks,
Virone Lorenzo