Rectangular objects created in paper space that display views.
Supported Platforms: Windows only
Class Information
- Class Name
-
AcadPViewport
- Object Inheritance
-
Object AcadObject AcadEntity AcadPViewport
- Create Using
-
VBA
PaperSpace.AddPViewport
- Access Via
-
VBA
PaperSpace.Item Document.ActivePViewport
Members
These members are part of this object:
Methods |
Properties |
Events |
---|---|---|
Remarks
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.
The ActiveSpace and MSpace properties are found on the Document object.
To create a PViewport object, use the AddPViewport method.