Hello everybody,
I want to obtain 2D coordinates at the viewport of curve endpoints within a View3D.
Therefore, I filter the visible elements with the FilteredElementCollector. Is there a way to directly obtain the 2D coordinates on the screen without doing perspective transformation of the element to the camera coordinates and project it to the image plane?
Greetings,
Chris
Hello everybody,
I want to obtain 2D coordinates at the viewport of curve endpoints within a View3D.
Therefore, I filter the visible elements with the FilteredElementCollector. Is there a way to directly obtain the 2D coordinates on the screen without doing perspective transformation of the element to the camera coordinates and project it to the image plane?
Greetings,
Chris
Dear Chris,
Yes, there is.
You can use the UIView class and its two methods GetZoomCorners and GetWindowRectangle.
The former returns Revit XYZ coordinates, the latter a Rectangle on the screen.
I show how to make use of this in
Did you find any other interesting solution in the (long) meantime?
Cheers,
Jeremy
Dear Chris,
Yes, there is.
You can use the UIView class and its two methods GetZoomCorners and GetWindowRectangle.
The former returns Revit XYZ coordinates, the latter a Rectangle on the screen.
I show how to make use of this in
Did you find any other interesting solution in the (long) meantime?
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.