C++
Acad::ErrorStatus acedSetCurrentView( AcDbViewTableRecord * pVwRec, AcDbViewport * pVP );
File
aced.h
Description
This function uses the information from the AcDbViewTableRecord pointed to by pVwRec to set the view in the AcDbViewport pointed to by pVP (if pVP != NULL) or in the current viewport (if pVP == NULL).
The ViewTableRecord pointed to by pVwRec should be opened for read, not for write.
If pVwRec points to a ViewTableRecord defining a non-paper space view, paper space is active, and pVP is not NULL, then the current viewport is changed to pVP.
If the pVwRecViewTableRecord points to a paper space view, and paper space is not currently active, then an attempt is made to switch to paper space.
Trans-space view changes are not allowed.
This function cannot be used while an acedCommand is active.
Returns Acad::eOk on success.
Returns Acad::eCommandWasInProgress if a trans-space view change is attempted or an acedCommand is in progress and fastzoom is off.
Returns Acad::eNullObjectPointer if pVwRec is NULL. Returns the same if pVP is NULL, pVwRec points to a ViewTableRecord that defines a non-paper space view, and paper space is active.
Returns Acad::eBadPaperspaceView if the pVwRec points to a paper space view, and paper space is not active.
Returns Acad::eNotInPaperspace if an attempt is made to switch to paper space, but tilemode is 1.
Parameters
Parameters | Description |
---|---|
pVwRec | Input pointer to ViewTableRecord to read data from |
pVP | Input pointer to Viewport to set view within |