Perspective eye and target coordinate extraction

Does anyone know how to extract coordinates for a perspective view target/eye?

Thank you both. I am having trouble running the script (something about “unlock” not being recognizable syntax).
That said, I thought that there may be a way to extract XYZ coords for eye and target points for perspectives without going into the API. Is that not the case?

Where does this assumption come from? Do you have any reference to share?

Well… this is probably an unfounded assumption. But there is a dynamo node (PerspectiveView,ByEyePointAndTarget) that creates a perspective view by inputting a 3d point for “eyePoint” and one for “target”. So, my guess is that the information of those 2 points may be stored somewhere. Something akin to line.EndPoint and line.StartPoint

Take a look at [&] View.SetPerspectiveCamera (Ampersand) or at PerspectiveView.OrientToEyeAndTargetPosition (Clockwork) and at the scripts inside maybe…

thanks. I’ll take a look. Though now I’ve found that it is tricky to get the camera’s focal length as an output.

Additionally, there is a new class for the camera in Revit 2018:

1 Like