ViewCameraTarget

Returns or sets the camera and target positions of the specified view.

Syntax

rhinoscriptsyntax.ViewCameraTarget ( view=None, camera=None, target=None )

rhinoscript.view.ViewCameraTarget ( view=None, camera=None, target=None )

Parameters

view

Optional.  String or Guid.  The title or identifier of the view.  If omitted, the current active view is used.

camera

Optional.  Array or Point3d.  A 3-D point identifying the new camera location.  If both camera and target are not specified, the current camera and target locations are returned.

target

Optional.  Array or Point3d.  A 3-D point identifying the new target location.  If both camera and target are not specified, the current camera and target locations are returned.

Returns

Point3d list

If both camera and target are not specified,  then the 3-D points containing the current camera and target locations is returned.

Point3d list

If either camera or target are specified,  then the 3-D points containing the previous camera and target locations is returned.

Example

import rhinoscriptsyntax as rs

view = rs.CurrentView()

camera = rs.GetPoint("Select new camera location")

target = rs.GetPoint("Select new target location")

if camera and target:

    rs.ViewCameraTarget( view, camera, target )

Also See

ViewCamera

ViewTarget