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: 

2D coordinates of curve endpoints in View3D

1 REPLY 1
Reply
Message 1 of 2
kropp10
427 Views, 1 Reply

2D coordinates of curve endpoints in View3D

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

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

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 

 

http://thebuildingcoder.typepad.com/blog/2012/10/uiview-windows-coordinates-referenceintersector-and...

 

Did you find any other interesting solution in the (long) meantime?

 

Cheers,

 

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  

Autodesk DevCon in Munich May 28-29th


Rail Community