Table of Contents

Method RecordSpaceView

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

RecordSpaceView(CadSpace, CadView, DisplayBox, string, bool)

Records that the view of a space has been zoomed or panned: one undo step, which puts the view back as it was before (U) or as it is now (REDO) with the drawing left alone, and an entry of the space's ZOOM Previous list, 20 at most. The wheel and the middle button of the canvas call it once their gesture is done; ZOOM, PAN and PLAN call it too. A zoom or a pan of the wheel or the middle button made straight after another joins its step, as AutoCAD 2021 combines consecutive real-time zooms and pans; typed ones stay a step each. A step is named ZOOM or PAN.

public CadEditResult RecordSpaceView(CadSpace space, CadView view, DisplayBox before, string name, bool realTime)

Parameters

space CadSpace

The space whose view moved: model space or a layout, whose paper is meant, not a viewport's view.

view CadView

The view of the space after the move; kept, so that an undo or a redo moves it.

before DisplayBox

The part of the space the view showed before the move, VisibleBox then.

name string

The name of the undo step, as ZOOM or PAN; a step joined keeps the name of the first.

realTime bool

Whether the move is the wheel's or the middle button's, which joins the real-time step before it where no other step, a save or an undo came between.

Returns

CadEditResult

What came of it: done, with no record where the view shows what it showed.

Exceptions

ArgumentNullException

Thrown when the space, the view or the name is null.