VPort

The viewport table (DXF Reference) stores the modelspace viewport configurations. So this entries just modelspace viewports, not paperspace viewports, for paperspace viewports see the Viewport entity.

Subclass of

ezdxf.entities.DXFEntity

DXF type

'VPORT'

Factory function

Drawing.viewports.new()

See also

DXF Internals: VPORT Configuration Table

class ezdxf.entities.VPort

Subclass of DXFEntity

Defines a viewport configurations for the modelspace.

dxf.owner

Handle to owner (ViewportTable).

dxf.name

Viewport name

dxf.flags

Standard flag values (bit-coded values):

16

If set, table entry is externally dependent on an xref

32

If both this bit and bit 16 are set, the externally dependent xref has been successfully resolved

64

If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is only for the benefit of AutoCAD)

dxf.lower_left

Lower-left corner of viewport

dxf.upper_right

Upper-right corner of viewport

dxf.center

View center point (in DCS)

dxf.snap_base

Snap base point (in DCS)

dxf.snap_spacing

Snap spacing X and Y

dxf.grid_spacing

Grid spacing X and Y

dxf.direction_point

View direction from target point (in WCS)

dxf.target_point

View target point (in WCS)

dxf.height

View height

dxf.aspect_ratio
dxf.lens_length

Lens focal length in mm

dxf.front_clipping

Front clipping plane (offset from target point)

dxf.back_clipping

Back clipping plane (offset from target point)

dxf.snap_rotation

Snap rotation angle in degrees

dxf.view_twist

View twist angle in degrees

dxf.status
dxf.view_mode
dxf.circle_zoom
dxf.fast_zoom
dxf.ucs_icon
  • bit 0: 0=hide, 1=show

  • bit 1: 0=display in lower left corner, 1=display at origin

dxf.snap_on
dxf.grid_on
dxf.snap_style
dxf.snap_isopair
reset_wcs() None

Reset coordinate system to the WCS.