How to get the camera Focal Length

How to get the camera Focal Length

pfk
Enthusiast Enthusiast
1,381 Views
2 Replies
Message 1 of 3

How to get the camera Focal Length

pfk
Enthusiast
Enthusiast

Hi

 

How can I get the Focal Length (set via the Navigation Wheel "Increase/Decrease Focal Length" menu item) from the API pls?

 

Thanks

 

Paul

0 Likes
1,382 Views
2 Replies
Replies (2)
Message 2 of 3

rosalesduquej
Alumni
Alumni

Hi Paul,

 

So I don't see anything that can be access from the API to that item. The ony thing I can suggest will be taking a look at the View3D class, but definetly more work will need to be done on your side to achieve what you are trying to do. Here is a post related to the View3D class I'm talking about. 

 

https://forums.autodesk.com/t5/revit-api/how-to-change-camera/td-p/5942690 

 

Check it out and maybe Can give you an idea on how to solve what you are trying to do. I see the link in that post does not work so use this one instead but read the post also. 

 

http://help.autodesk.com/view/RVT/2016/ENU/?guid=GUID-A7FA8DBC-830E-482D-9B66-147399524442

 

Cheers,



Jaime Rosales D.
Sr. Developer Consultant
Twitter | AEC ADN DevBlog
0 Likes
Message 3 of 3

pfk
Enthusiast
Enthusiast

Hi Jaime

 

Thanks for the link.

 

I did some testing, and changing the Revit focal length (via Increase/Decrease Focal Length) does not change any of the View3D properties that I can see.  It does not change the Origin, Outline, Cropbox, UpDirection, ViewDirection, RightDirection or SectionBox.  So I am perplexed - I do not understand how to obtain the Focal Length.

 

Paul