Viewports

autocad_entity: autocad_viewport

Features with autocad_entity set to autocad_viewport are read from drawing files as rectangular entities that represent viewport entities from a paper space. They will have a number of attributes that define how the viewport will appear in an AutoCAD application.

If the Read Model Space Entities Through Viewport reader parameter is selected, a representation of model space entities will be read as they appear through the viewport. These features will have the attribute autocad_viewport_handle set to the handle of the viewport they were read through. The resulting features are only a representation of model space entities and will be ignored by the writer. Writing of these features can be forced by removing the autocad_viewport_handle attribute.

Attribute Name Content
autocad_viewport_ambient_light_color

The ambient light color.

Range: 0...256

autocad_viewport_anno_scale

The name of the current annotation scale of the viewport object, as a ratio of paper scale units to drawing scale units.

Range: Any defined annotation scale in the drawing annotation scale list

Default: 1:1

autocad_viewport_anno_scale_drawing_units

The numeric value of the drawing scale, as a part of the current annotation scale for the viewport.

Range: A real number matching the drawing scale of the current annotation scale.

Default: 1.0

autocad_viewport_anno_scale_paper_units

The numeric value of the paper scale, as a part of the current annotation scale for the viewport.

Range: A real number matching the paper scale of the current annotation scale.

Default: 1.0

autocad_viewport_back_clip

Indicates whether the back clipping pane is on.

Range: Yes | No

autocad_viewport_back_clip_distance

The distance (along the camera-target line) from the target to the back clipping plane. Positive values indicate that the clipping plane is in front of the target (between target and camera), negative values indicate that the clipping plane is behind the target.

Range: 64-bit floating point number

autocad_viewport_brightness

The brightness factor (relative intensity of lights).

Range: -10...10

autocad_viewport_center_point_x

The x-axis coordinate of the center point (in paper space WCS coordinates).

Range: 64-bit floating point number

autocad_viewport_center_point_y

The y-axis coordinate of the center point (in paper space WCS coordinates).

Range: 64-bit floating point number

autocad_viewport_center_point_z

The z-axis coordinate of the center point (in paper space WCS coordinates).

Range: 64-bit floating point number

autocad_viewport_circle_sides

The circle zoom percentage; controls the number of sides when displaying curves an AutoCAD application.

Range: 1...20000

autocad_viewport_contrast

The contrast factor (intensity of ambient light, relative to other lights).

Range: -10...10

autocad_viewport_custom_scale

The custom scale factor. Defines the relationship between paper space units and units in the viewport. A custom scale of 0.5 would indicate that 1 unit in the viewport is 0.5 units in the paper space.

Range: 64-bit floating point number

autocad_viewport_default_lighting

Indicates whether default lighting is on.

Range: Yes | No

autocad_viewport_default_lighting_type

The type of default lighting being used in the viewport.

Range: 0 for old type | 1 for new type

autocad_viewport_front_clip

Indicates whether the front clipping plane is on.

Range: Yes | No

autocad_viewport_front_clip_eye

Indicates whether the front clipping plane is currently located at the camera.

Range: Yes | No

autocad_viewport_front_clip_distance

The distance (along the camera-target line) from the target to the front clipping plane. Positive values indicate that the clipping plane is in front of the target (between target and camera), negative values indicate that the clipping plane is behind the target.

Range: 64-bit floating point number

autocad_viewport_grid

Indicates whether the grid is on.

Range: Yes | No

autocad_viewport_grid_adaptive

Indicates whether the grid adapts to display fewer lines in the viewport.

Range: Yes | No

autocad_viewport_grid_bound_limits

Indicates whether the grid is drawn beyond limits for the WCS and UCS in the viewport.

Range: Yes | No

autocad_viewport_grid_follow

Indicates whether the grid will follow a dynamic UCS change in the viewport.

Range: Yes | No

autocad_viewport_grid_increment_x

The x-axis spacing (in drawing units) of the grid.

Range: 64-bit floating point number

autocad_viewport_grid_increment_y

The y-axis spacing (in drawing units) of the grid.

Range: 64-bit floating point number

autocad_viewport_grid_major

The number of minor grid lines between each major grid line in the viewport.

Range: 1...100

autocad_viewport_grid_subdivision_restricted

Indicates whether subdivisions are allowed below the minor grid spacing in the viewport.

Range: Yes | No

autocad_viewport_height

The height of the viewport entity (in paper space WCS units).

Range: 64-bit floating point number

autocad_viewport_hidden_lines_removed

Indicates whether hidden lines should be removed during the plotting of the viewport entity.

Range: Yes | No

autocad_viewport_lens_length

The lens length used when perspective mode is on for the viewport entity.

Range: 64-bit floating point number greater than 0.0

autocad_viewport_locked

Indicates whether the scale of the viewport entity is locked.

Range: Yes | No

autocad_viewport_non_rect_clip

Indicates whether non-rectangular clipping is currently turned on.

Range: Yes | No

autocad_viewport_non_rect_clip_handle

The handle of the non-rectangular clipping entity which is associated with the viewport entity.

Range: char[50]

autocad_viewport_on

Indicates whether the viewport entity is on or off.

Range: Yes | No

autocad_viewport_perspective

Indicates whether or not the perspective mode is on.

Range: Yes | No

autocad_viewport_plot_style_sheet

The name of the style sheet applied to objects seen through the viewport when viewed in the native application.

Range: String

autocad_viewport_resolved_target_x

The x coordinate of the resolved target of the viewport entity; takes into account the view target, the view center, the view direction, and twist angle.

Range: 64-bit floating point number

autocad_viewport_resolved_target_y

The y coordinate of the resolved target of the viewport entity; takes into account the view target, the view center, the view direction, and twist angle.

Range: 64-bit floating point number

autocad_viewport_resolved_target_z

The z coordinate of the resolved target of the viewport entity; takes into account the view target, the view center, the view direction, and twist angle.

Range: 64-bit floating point number

autocad_viewport_shade_plot

The shade plot mode which specifies how the viewport entity will be plotted.

Range: As Displayed | Wireframe | Hidden | Rendered | Visual Style | Render Preset

autocad_viewport_snap

Indicates whether snap mode is currently on.

Range: Yes | No

autocad_viewport_snap_angle

The snap angle (in degrees). The snap angle is within the UCS XY plane, positive angles measured counter-clockwise from the positive UCS x-axis.

Range: 64-bit floating point number

autocad_viewport_snap_base_point_x

The x-axis coordinate of the snap base point (in UCS coordinates).

Range: 64-bit floating point number

autocad_viewport_snap_base_point_y

The y-axis coordinate of the snap base point (in UCS coordinates).

Range: 64-bit floating point number

autocad_viewport_snap_increment_x

The x spacing of the snap grid.

Range: 64-bit floating point number

autocad_viewport_snap_increment_y

The y spacing of the snap grid.

Range: 64-bit floating point number

autocad_viewport_snap_iso_pair

The snap IsoPair (which indicates the current isometric plane) setting. Used when autocad_viewport_snap_isometric is set to Yes.

Range: 0 for left isoplane | 1 for top isoplane | 2 for right isoplane

autocad_viewport_snap_isometric

Indicates whether the snap mode is currently set to isometric.

Range: Yes | No

autocad_viewport_standard_scale

The scale of the view of the viewport entity when viewed with an AutoCAD application.

Range: Scale to fit | Custom | 1:1 | 1:2 | 1:4 | 1:5 | 1:8 | 1:10 | 1:16 | 1:20 | 1:30 | 1:40 | 1:50 | 1:100 | 2:1 | 4:1 | 8:1 | 10:1 | 100:1 | 1/128" = 1'-0" | 1/64" = 1'-0" | 1/32" = 1'-0" | 1/16" = 1'-0" | 3/32" = 1'-0" | 1/8" = 1'-0" | 3/16" = 1'-0" | 1/4" = 1'-0" | 3/8" = 1'-0" | 1/2" = 1'-0" | 3/4" = 1'-0" | 1" = 1'-0" | 1-1/2" = 1'-0" | 3" = 1'-0" | 6" = 1'-0" | 1'-0" = 1'-0" |

autocad_viewport_twist_angle The twist angle (in degrees) of the view of the viewport entity when viewed within an AutoCAD application. The twist angle is a rotation around the view's line of sight (line from camera to target); positive angles measured counter-clockwise from the right horizontal axis. Range: 64-bit floating point number
autocad_viewport_ucs_elevation

The elevation of the UCS plane.

Range: 64-bit floating point number

autocad_viewport_ucs_follow_mode

Indicates whether the viewport entity is set to generate and display a plan view in an AutoCAD application whenever the UCS changes in the viewport.

Range: Yes | No

autocad_viewport_ucs_icon_origin

Indicates whether the viewport entity is set to have the UCS icon follow the current UCS origin.

Range: Yes | No

autocad_viewport_ucs_icon_visible

Indicates whether the viewport entity is set to have the UCS icon display.

Range: Yes | No

autocad_viewport_ucs_origin_x

The x coordinate of the origin point for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_origin_y

The y coordinate of the origin point for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_origin_z

The z coordinate of the origin point for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_xdir_x

The x coordinate of the x-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_xdir_y

The y coordinate of the x-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_xdir_z

The z coordinate of the x-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_ydir_x

The x coordinate of the y-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_ydir_y

The y coordinate of the y-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_ydir_z

The z coordinate of the y-axis for the UCS of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_ucs_saved_with_viewport

Indicates whether there is a UCS that is saved with the viewport entity.

Range: Yes | No

autocad_viewport_view_center_x

The x coordinate of the view display (in display coordinate system coordinates) of the view in the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_center_y

The y coordinate of the view display (in display coordinate system coordinates) of the view in the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_direction_x

The x coordinate of the vector (in model space WCS coordinates) from the view's target to the view's camera of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_direction_y

The y coordinate of the vector (in model space WCS coordinates) from the view's target to the view's camera of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_direction_z

The z coordinate of the vector (in model space WCS coordinates) from the view's target to the view's camera of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_height

The height (in model space UCS coordinates) of the model space view within the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_target_x

The x coordinate of the location (in model space WCS coordinates) of the view's target of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_target_y

The y coordinate of the location (in model space WCS coordinates) of the view's target of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_view_target_z

The z coordinate of the location (in model space WCS coordinates) of the view's target of the viewport entity.

Range: 64-bit floating point number

autocad_viewport_width

The width of the viewport entity in paper space units.

Range: 64-bit floating point number