ObjectDCL Banner

BlockView_SetView Method

Description

This method will set the block view display properties. Specifically, it sets the target position, the camera position, the up director vector, the camera field width and height and is the view being displayed in perspective.

If the last argument isPerspective is not supplied, false or Nil is assumed.

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
3dTargetPoint
String identifying the orientation of the camera.
3dCameraPoint
String identifying the location of the camera.
3dUpVector
String identifying the direction of the camera  (its up-side).
rFieldWidth
String identifying the field of view width.
rFieldHeight
String identifying the field of view height.
bIsPerspective
String identifying whether perspective view (T) or the isometric view (Nil) is used.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found or does not support this function.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_BlockView_SetView 
		MyControlReference [as Reference]
		3dTargetPoint [as 3dPoint] 
		3dCameraPoint [as 3dPoint] 
		3dUpVector [as 3dPoint] 
		rFieldWidth [as Float] 
		rFieldHeight [as Float] 
		[Optional] bIsPerspective [as Boolean]
	)

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_BlockView_SetView
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		3dTargetPoint [as 3dPoint] 
		3dCameraPoint [as 3dPoint] 
		3dUpVector [as 3dPoint] 
		rFieldWidth [as Float] 
		rFieldHeight [as Float] 
		[Optional] bIsPerspective [as Boolean]
	)

Applies For

BlockView.

Example

CopyCode imageCopy Code
; Set the camera
(Odcl_BlockView_SetView MyProject_MyForm_MyControl
	(list 1 0 0)
	(list 0 0 0)
	(list 0 1 0)
	320
	180
	Nil)