A view is a named ‘look’ at the drawing model. When you create a specific views by name, you can use them for layout or when you need to refer to specific details. A named view consists of a specific magnification, position, and orientation.

Create a view:

drawing.add_view(name, ...)

is a shortcut for:

view = DXFEngine.view(name, ...)
DXFEngine.view(name, **kwargs)
  • name (string) – view name
  • flags (int) – standard flag values, bit-coded, default=0 STD_FLAGS_PAPER_SPACE, if set this is a paper space view.
  • height, width (float) – view height and width, in DCS?!, default=1.0
  • center_point – view center point, in DCS?! (xy-tuple), default=(.5, .5)
  • direction_point – view direction from target point, in WCS!! (xyz-tuple), default=(0, 0, 1)
  • target_point – target point, in WCS!! (xyz-tuple), default=(0, 0, 0)
  • lens_length (float) – lens length, default=50
  • front_clipping (float) – front and back clipping planes, offsets from target point, default=0
  • back_clipping – see front_clipping
  • view_twist (float) – twist angle in degree, default=0
  • view_mode (int) – view mode, bit-coded, default=0

View Mode Flags

Flags Description
VMODE_TURNED_OFF view is turned off if bit is set
VMODE_PERSPECTIVE_VIEW_ACTIVE view is in perspective mode if bit is set
VMODE_FRONT_CLIPPING_ON front clipping is on if bit is set
VMODE_BACK_CLIPPING_ON back clipping is on if bit ist set