codebase="hhctrl.ocx#Version=4,73,8561,0"> codebase="hhctrl.ocx#Version=4,73,8561,0" > codebase="hhctrl.ocx#Version=4,73,8561,0" >
 
  PViewport object

Rectangular objects created in paper space that display views.

VBA class name:

AcadPViewport 

Create using:

PaperSpace.AddPViewport 

Access via:

PaperSpace.Item
Document.ActivePViewport 

The functionality of the PViewport object is slightly different from what is used in the AutoCAD user interface. Users familiar with AutoCAD paper space viewport functionality will find the following information helpful.

In ActiveX Automation, the ActiveSpace property is used to control the TILEMODE system variable. Setting ThisDrawing.ActiveSpace = acModelSpace is equivalent to setting TILEMODE = 1, and setting ThisDrawing.ActiveSpace = acPaperSpace is equivalent to setting TILEMODE = 0.

Similarly, the MSpace property is the equivalent of both the MSPACE and PSPACE commands in AutoCAD. Setting ThisDrawing.MSpace = True is the same as using the MSPACE command, and setting ThisDrawing.MSpace = False is the same as using the PSPACE command.

In addition, the ActiveX Automation user is required to use the Display method before setting the MSpace property to TRUE. The Display method initializes certain graphic settings that must be set before switching to model space. In AutoCAD this is done "behind the scenes." However, in the ActiveX Automation interface, the programmer must take care of this initialization.

NOTE Remember, you must turn on the display using the Display method for at least one PViewport object before you can set the MSpace property to TRUE. Failure to turn on the display will result in an error being returned when you try to set the MSpace property.

The ActiveSpace and MSpace properties are found on the Document object.

To create a PViewport object, use the AddPViewport method. To edit or query a paper space viewport object, use the following methods and properties:

Methods

ArrayPolar

ArrayRectangular

Copy

Display

Delete

GetBoundingBox

GetExtensionDictionary

GetGridSpacing

GetSnapSpacing

GetXData

Highlight

LayerPropertyOverrides

Mirror

Mirror3D

Move

Rotate

Rotate3D

ScaleEntity

SetGridSpacing

SetSnapSpacing

SetXData

SyncModelView

TransformBy

Update  

Properties

Application

ArcSmoothness

Center

Clipped

CustomScale

Direction

DisplayLocked

Document

GridOn

Handle

HasExtensionDictionary

HasSheetView

Height

Hyperlinks

LabelBlockId

LabelBlockId32

Layer

LensLength

Linetype

LinetypeScale

Lineweight

ModelView

ObjectID

ObjectName

OwnerID

PlotStyleName

RemoveHiddenLines

ShadePlot

SheetView

SnapBasePoint

SnapOn

SnapRotationAngle

StandardScale

Target

TrueColor

TwistAngle

UCSIconAtOrigin

UCSIconOn

UCSPerViewport

ViewportOn

Visible

Width

Events

Modified  

 

   Comments?