Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am trying to rotate an element around the project origin point to compensate for the rotation of the plan with respect to true north. This works fine for "new" views, but for original views, the rotation does not seem to occur around the origin point.
To investigate the issue, I used RevitLookup and discovered that for original views, the "Origin" property differs depending on whether the view is set to project north or true north. For new views, the origin is always (0,0,z).
How can I retrieve the correct origin values for original views in order to perform a translation of my element to account for this difference ?
ProjectLocation projectLoc = doc.ActiveProjectLocation;
ProjectPosition projectPos = projectLoc.GetProjectPosition(XYZ.Zero);
double northAngle = projectPos.Angle;
XYZ orig = XYZ.Zero;
Line rot = Line.CreateUnbound(orig, XYZ.BasisZ);
ElementTransformUtils.RotateElement(doc, filReg.Id, rot, northAngle);
Thanks 😉
Solved! Go to Solution.