Reset Active Objects
 
 
 

Changes to most active objects, such as the active layer and active linetype, will appear immediately. However, there are several active objects that must be reset for changes to appear. These objects are the active text style, the active user coordinate system (UCS), and the active viewport. If changes are made to any of these objects, the object must be reset, and the Regen method must be called for the changes to appear.

To reset these objects, simply set the ActiveTextStyle, ActiveUCS, or ActiveViewport property, using the updated object.

Reset the active viewport

The following example changes the display of the grid in the active viewport and then resets the viewport as the active viewport to display the change.

Sub Ch3_ResetActiveViewport()
	' Toggle the setting of the grid display
	' for the active viewport
	ThisDrawing.ActiveViewport.GridOn = _
			Not (ThisDrawing.ActiveViewport.GridOn)


	' Reset the active viewport
	ThisDrawing.ActiveViewport = ThisDrawing.ActiveViewport
End Sub