<5> objectARX development: view window zoom, get view window information, screenshot, save view dwg file

1. Function introduction

  In AutoCAD, the view refers to the content displayed in the graphics window. Use the ZOOM command to zoom the view, use the
PAN command to move the view, and use the VIEW command to manage the view.
1. Simulate window zoom, range zoom, and proportional zoom.
2. Obtain the information of the current view window.
3. Take a screenshot of the current view window and save it as a picture.
4. Save the entity selected in the current view window as a .dwg file. *

2. Implementation ideas

  The AcDbViewTableRecord class in ObjectARX is used to represent the view in AutoCAD, and it inherits several member functions from the AcDbAbstractViewTableRecord class. When adjusting the view, it is generally necessary to obtain the current view first, set some characteristics, and then use the acedSetCurrentView function to update the view. Obtaining the current view does not directly provide relevant functions in ObjectARX, and can only obtain the characteristics of the current view by querying the value of the system variable, create a new view object, set these characteristics on it, and use it as the current view. The system variables related to the view are given below:
 VIEWMODE: The "view" mode of the current viewport.
 VIEWCTR: The center point of the view in the current viewport (UCS coordinates).
 LENSLENGTH: The focal length of the lens in the perspective of the current viewport (in millimeters).
 TARGET: The position of the target point in the current viewport (expressed in UCS coordinates).
 VIEWDIR: The viewing direction (UCS) of the current viewport.
 VIEWSIZE: The view height of the current viewport (

Guess you like

Origin blog.csdn.net/m0_37251750/article/details/130637315