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
Anonymous
493 Views, 1 Reply

2D coordinates of curve endpoints in View3D

Anonymous
Not applicable

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

0 Likes

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: Anonymous

jeremytammik
Autodesk
Autodesk

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

0 Likes

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 Design & Make Report