Create Camera Perspective View at CCTV Locations

Hi everyone, I’m trying to use Dynamo to create camera perspective views at CCTV locations in the model to reflect what the cameras will capture. However how Revit generates View 3D is very confusing to me and I would be glad to have some assistance.

I read the page below:
View3D | Revit | Autodesk Knowledge Network

I don’t really understand why so many planes are required, and what the crop box min and max represent. When I think of generating a perspective view, a vector specifying the direction of the view, a horizontal and vertical FOV in degrees, and a view distance (range of depth) should be all it needs to create a view?

I came across the follow site with a script to adjust FOV of a perspective view:
Set a perspective view’s field of view with Dynamo – O=B (

Let me describe what have achieved for now. I get CCTV instances of a family type, then use their hand and facing orientation to get the front direction and a start point for the camera view. Then I set an angle, and use reference intersector to find the point and element they hit. The point it hits is feed into the PerspectiveView.ByEyePointAndTarget node to create views. After that the python program from the site above is used to change the FOV. The script works for adjusting horizontal and vertical FOV, but I don’t understand how the crop box max and min are defined. I am not able to change the view distance (far clip distance) by changing the value of Zmax.

Also, why does the PerspectiveView.ByEyePointAndTarget node require a target point? I am thinking a vector defining the direction of the view should be sufficient. What difference does it make if the target point is on the same straight line (e.g. 100m away vs 10m away)? The far clip distance doesn’t seem to be affected anyway? I am thinking maybe I don’t even need to make a reference intersector since I can just throw a random bounding box and a target point at any distance on the camera laser, then adjust the FOV with the python script later. Although idk how to set the view distance I can change the Far Clip Offset parameter to control that.

Sorry if I didn’t describe my problem clearly (it’s quite complex to me), and thanks in advance for whoever read it this far!

1 Like