Creates a new AcDbViewportTableRecord instance.
Gets the attributes object for this AcDbObject.
The AcCmObject instance containing all attributes
The object dD of the new background for the view.
Gets the center point of the viewport.
The center point of the viewport
Gets or sets the circle zoom percent.
This controls the number of sides to the tessellation used when displaying curves. The value can be between 1 and 20000, with higher settings using more sides in the curve tessellation.
The number of sides used for circle tessellation
Gets the database in which this object is resident.
When an object isn't added to a database, this property returns the current working database. After it is added to a database, it will be set automatically. You should never set this value manually.
The database this object belongs to
Sets the database for this object.
This is typically set automatically when the object is added to a database. Manual setting should be avoided unless you know what you're doing.
The database to associate with this object
An AcGePoint2d in which the X value represents the X spacing (in drawing units) of the grid and the Y value represents the Y spacing of the grid.
The number of minor grid lines between each major grid line in the viewport.
Gets or sets the lower left corner of the viewport window.
The X and Y values of this point are expressed as a value between (0.0, 0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for the upper right corner of the AutoCAD graphics area. For example, a lower left corner value of (0.5, 0.0) indicates that the viewport's lower left corner is along the bottom of the AutoCAD graphics area, midway between the left and right edges of the graphics area.
The lower left corner point
Gets or sets the name of the symbol table record.
This property corresponds to DXF group code 2 and is used for identifying and referencing the symbol table record.
The name of the symbol table record
Gets the object ID.
AutoCAD uses 64-bit integers to represent handles, which exceed the maximum integer value of JavaScript. Therefore, strings are used to represent object handles.
The object ID as a string
Sets the object ID.
The new object ID
Gets the object ID of the owner of this object.
The owner object ID
Sets the object ID of the owner of this object.
The new owner object ID
The snap angle setting (in radians) for the viewport table record. The snap angle is measured within the UCS XY plane, with zero being the UCS X axis and positive angles going counterclockwise when looking down the UCS Z axis towards the UCS origin.
The snap basepoint (in UCS coordinates) for the viewport table record.
An AcGePoint2d in which the X value represents the X spacing of the snap grid and the Y value represents the Y spacing of the snap grid. Both values are in drawing units.
The upper right corner of the viewport window. The X and Y values of this point are expressed as a value between (0.0, 0.0) for the lower left corner of the AutoCAD graphics area and (1.0, 1.0) for upper right corner of the AutoCAD graphics area. For example, an upper right corner value of (0.5, 1.0) indicates that the viewport's upper right corner is along the top of the AutoCAD graphics area, midway between the left and right edges of the graphics area.
Gets the value of the specified attribute.
This method will throw an exception if the specified attribute doesn't exist. Use getAttrWithoutException() if you want to handle missing attributes gracefully.
The name of the attribute to retrieve
The value of the specified attribute
Gets the value of the specified attribute without throwing an exception.
This method returns undefined if the specified attribute doesn't exist, making it safer for optional attributes.
The name of the attribute to retrieve
The value of the specified attribute, or undefined if it doesn't exist
Sets the value of an attribute.
The name of the attribute to set
Optional
val: AcDbSymbolTableRecordAttrs[A]The value to assign to the attribute
Represents a viewport table record in AutoCAD.
This class represents viewport arrangements in AutoCAD, which define how the drawing is displayed in different areas of the screen or paper space. Viewports can have their own zoom levels, pan positions, grid settings, and other display properties.
Example