Chapter 4 -- TABLES Section
VPORT

The following group codes apply to VPORT symbol table entries. The VPORT table is unique: it may contain several entries with the same name (indicating a multiple-viewport configuration). The entries corresponding to the active viewport configuration all have the name *ACTIVE. The first such entry describes the current viewport. In addition to the group codes described here, see "Common Group Codes for Symbol Table Entries." For information about abbreviations and formatting used in this table, see "Formatting Conventions in This Reference."

VPORT group codes
Group codes Description

100

Subclass marker (AcDbViewportTableRecord)

2

Viewport name

70

Standard flag values (bit-coded values):
16 = If set, table entry is externally dependent on an xref.
32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved.
64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files.)

10

Lower-left corner of viewport
DXF: X value; APP: 2D point

20

DXF: Y value of lower-left corner of viewport

11

Upper-right corner of viewport
DXF: X value; APP: 2D point

21

DXF: Y value of upper-right corner of viewport

12

View center point (in DCS)
DXF: X value; APP: 2D point

22

DXF: Y value of view center point (in DCS)

13

Snap base point
DXF: X value; APP: 2D point

23

DXF: Y value of snap base point

14

Snap spacing X and Y
DXF: X value; APP: 2D point

24

DXF: Y value of snap spacing X and Y

15

Grid spacing X and Y
DXF: X value; APP: 2D point

25

DXF: Y value of grid spacing X and Y

16

View direction from target point (in WCS)
DXF: X value; APP: 3D point

26, 36

DXF: Y and Z values of view direction from target point
(in WCS)

17

View target point (in WCS)
DXF: X value; APP: 3D point

27, 37

DXF: Y and Z values of view target point (in WCS)

40

View height

41

Viewport aspect ratio

42

Lens length

43

Front clipping plane (offset from target point)

44

Back clipping plane (offset from target point)

50

Snap rotation angle

51

View twist angle

68

APP: Status field (never saved in DXF)

69

APP: ID (never saved in DXF)

71

View mode (see VIEWMODE system variable)

72

Circle zoom percent

73

Fast zoom setting

74

UCSICON setting

75

Snap on/off

76

Grid on/off

77

Snap style

78

Snap isopair

281

Render mode:
0 = 2D Optimized (classic 2D)
1 = Wireframe
2 = Hidden line
3 = Flat shaded
4 = Gouraud shaded
5 = Flat shaded with wireframe
6 = Gouraud shaded with wireframe

All rendering modes other than 2D Optimized engage the new 3D graphics pipeline. These values directly correspond to the SHADEMODE command and the AcDbAbstractViewTableRecord::RenderMode enum.

65

Value of UCSVP for this viewport. If set to 1, then viewport stores its own UCS which will become the current UCS whenever the viewport is activated. If set to 0, UCS will not change when this viewport is activated.

110

UCS origin
DXF: X value; APP: 3D point

120, 130

DXF: Y and Z values of UCS origin

111

UCS X-axis
DXF: X value; APP: 3D vector

121, 131

DXF: Y and Z values of UCS X-axis

112

UCS Y-axis
DXF: X value; APP: 3D vector

122, 132

DXF: Y and Z values of UCS Y-axis

79

Orthographic type of UCS
0 = UCS is not orthographic;
1 = Top; 2 = Bottom;
3 = Front; 4 = Back;
5 = Left; 6 = Right

146

Elevation

345

ID/handle of AcDbUCSTableRecord if UCS is a named UCS.  If not present, then UCS is unnamed.

346

ID/handle of AcDbUCSTableRecord of base UCS if UCS is orthographic (79 code is non-zero).  If not present and 79 code is non-zero, then base UCS is taken to be WORLD.