MAXScript Tools and Interaction with 3ds Max > Interacting with the 3ds Max User Interface > Viewports >

# Refreshing the Viewports

The following methods force the viewports to redraw, or control when the viewports are redrawn.

    redrawViews()

Causes the 3ds Max viewports to be immediately redrawn in an optimal way, such that only those parts of the view that have changed are redrawn. This is different from forcing a redraw with the max view redraw command or one of the following methods which redraw the entire scene in all views.

    completeRedraw()
    forceCompleteRedraw [ doDisabled:<boolean> ]

Calling this method will cause all the viewports to be completely redrawn. This method literally forces everything (every object, every screen rectangle, every view) to be marked invalid and then the whole scene is regenerated. The individual object pipeline caches are not flushed, however. This routine is guaranteed to be slow. If the optional doDisabled: boolean argument for ForceCompleteRedraw is true , disabled viewports will also be redrawn.

    setNeedsRedraw complete:<bool>

Sets an internal MAXScript flag that viewports need to be redrawn before MAXScript returns. This is equivalent to a delayed redrawViews() .

If complete: is true, a flag is set that a complete viewport redraw is needed. This is equivalent to a delayed completeRedraw() .

Available in 3ds Max 2008 and higher. Previously available in Avguard Extensions.

    disableSceneRedraw()

Turns viewport scene redraw off (disables it).

All calls to DisableSceneRedraw() / EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

It is a better practice to use thewith redraw off Context which turns off redraws only for the expression inside the Context's body.

    enableSceneRedraw()

Turns viewport scene redraw on (enables it).

All calls to DisableSceneRedraw() / EnableSceneRedraw() must be in pairs, since an internal counter is used in 3ds Max to actually do the redraw enable/disable action.

It is a better practice to use the with redraw off Context which turns off redraws only for the expression inside the Context's body.

    isSceneRedrawDisabled()

Returns true if scene redraw is disabled, false if it is enabled.

    nodeInvalRect <node>

Invalidates the rectangle in the viewports that the node is occupying. Rectangles flagged as invalid will be updated on the next screen redraw.

#### See Also

- Redraw Context