Function Entry: SETVIEW

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: SETVIEW

Name

setview

Class

Function

Syntax

(setview view_descriptor [vport_id])

Arguments and Values

  • `viewdescriptor: an entity-definition list similar to that returned by tblsearch for the VIEW` symbol table.
  • `vportid (optional): integer; the destination viewport. 0 selects the current viewport. The viewport identifier is held by the CVPORT` system variable.

Description

Establishes a view for a specified viewport.

Return Values

The `viewdescriptor on success, or nil` on failure.

Side Effects

Updates the named viewport's view to the supplied descriptor.

Examples

Not documented on the vendor page.

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.

Source Notes

Vendor Divergence

Measured 2026-10-05 (probe-viewports.lsp, the jobs under VPORTS), with the list (tblsearch "VIEW" name) of a view saved by -VIEW: both products return that list unchanged with no viewport argument and with (getvar "CVPORT"), and nil for a viewport that does not exist (99). They differ on (setview nil): AutoCAD 2022 signals "type d'argument incorrect: lresbp nil", BricsCAD (V25 and V26) returns nil.

clautolisp

Returns the view when the viewport is absent or one of (vports), nil otherwise; a non-list view is a bad-argument error, except under the BricsCAD dialects (nil). Headless, no display changes.