vports
(vports)
The vports function retrieves a description of all Viewtiles displayed on the Model tab or of all Viewports established on a Sheet tab.
Arguments
The function is used without any argument.
Return Value
The function returns a list that includes the viewport descriptions as an identification number, followed by viewport bounding box coordinates (lower-left and upper-right corner). Each viewport description is returned in a sublist.
The function returns nil, if no drawing is open.
The coordinates returned in the description list vary, depending on whether the current drawing displays the Model or a Sheet tab.
Model Viewtiles List
When the Model tab is active, the list describes the Viewtiles. The coordinates indicate the viewport's lower left and upper right corners of the drawing area of the program's desktop.
Viewtiles in model space are managed by the Viewtiles and -Viewport commands. You can retrieve the current Viewport identifier, that is a Viewport number, by applying the Lisp expression (getvar "CVPORT").
Sheet Viewports List
When a Sheet tab is active, the list consists of the Viewports created on the current Sheet (in paper space). The corners are described by Sheet coordinates.
Viewport entities are created with the Viewport or -Viewport commands. On a Sheet, viewport number 1 is always the visible part of the drawing on the Sheet.
: (vports)
((0 (0.003233 0.005155) (0.996767 0.994845)))
: (vports)
((0 (0.003233 0.005155) (0.500000 0.994845)) (1 (0.500000 0.005155) (0.996767 0.994845)))
: (vports)
((1 (-0.000000 0.000000) (14.162791 9.000000)))
: _Viewport
Specify start corner» p1
Specify second corner» p2
: _Viewport
Specify start corner» p3
Specify second corner» p4
: (vports)
((1 (-0.000000 0.000000) (14.162791 9.000000)) (2 (1.978552 3.860590) (5.815013 6.924933)) (3 (8.541554 2.509383) (12.908847 5.839142)))
tblnext, tblsearch