This class ised used to pass back information to the user about the viewing characteristics of the current viewport.

Constructors

Accessors

  • get box(): AcGeBox2d
  • The bounding box (in world coordinate system coordinates) of the viewport.

    Returns AcGeBox2d

  • get centerPoint(): AcGePoint3d
  • The center point of the viewport entity in WCS coordinates (within Paper Space).

    Returns AcGePoint3d

  • set centerPoint(value: AcGePoint3d): void
  • Parameters

    Returns void

  • get groupId(): string
  • The id of the group which this viewport belongs to.

    Returns string

  • set groupId(value: string): void
  • Parameters

    • value: string

    Returns void

  • get height(): number
  • The height of the viewport entity's window in drawing units.

    Returns number

  • set height(value: number): void
  • Parameters

    • value: number

    Returns void

  • get id(): string
  • The id of the viewport.

    Returns string

  • set id(value: string): void
  • Parameters

    • value: string

    Returns void

  • get number(): number
  • The viewport ID number. If the viewport is inactive, -1 is returned.

    Returns number

  • set number(value: number): void
  • Parameters

    • value: number

    Returns void

  • get viewBox(): AcGeBox2d
  • The bounding box of the Model Space view shown through this viewport, expressed in WCS coordinates.

    viewCenter is stored in DCS; AutoCAD maps it to WCS by rotating by viewTwistAngle and translating by viewTarget (same rule as AcDbViewportTableRecord.modelViewBox for the *ACTIVE VPORT).

    Returns AcGeBox2d

  • get viewCenter(): AcGePoint3d
  • The view center (in display coordinate system coordinates) of the view in the viewport.

    Returns AcGePoint3d

  • set viewCenter(value: AcGePoint3d): void
  • Parameters

    Returns void

  • get viewHeight(): number
  • The height (in display coordinate system coordinates) of the Model Space view within the viewport. Zooming the view out within the viewport increases this value and zooming in decreases this value.

    Returns number

  • set viewHeight(value: number): void
  • Parameters

    • value: number

    Returns void

  • get viewTarget(): AcGePoint3d
  • The view target in WCS coordinates (DXF group 17).

    Paper-space viewports store the model view center in DCS (viewCenter); the WCS center is viewTarget + rotate(viewCenter, viewTwistAngle).

    Returns AcGePoint3d

  • set viewTarget(value: AcGePoint3d): void
  • Parameters

    Returns void

  • get viewTwistAngle(): number
  • The view twist angle in radians (DXF group 51).

    Returns number

  • set viewTwistAngle(value: number): void
  • Parameters

    • value: number

    Returns void

  • get viewWidth(): number
  • The width (in display coordinate system coordinates) of the Model Space view within the viewport. This is one computed property based on 'viewHeight' and viewport ratio of width and height.

    Returns number

  • get width(): number
  • The width of the viewport entity's window in drawing units. This is the width in Paper Space of the viewport itself, not the width of the Model Space view within the viewport.

    Returns number

  • set width(value: number): void
  • Parameters

    • value: number

    Returns void

Methods

  • Clone this viewport

    Returns AcGiViewport

    Return the cloned instance of this viewport

  • Copy the property values of the passed viewport to this viewport.

    Parameters

    Returns this

    Return this viewport