APIDb_​SetZoomID

Sets the zoom box of the current database.

    GSErrCode ACAPI_Database (
        APIDb_SetZoomID,
        API_Box*     zoomBox,
        API_Tranmat* tranmat
    );

 

Parameters

zoomBox
[in] The zoom parameters to set; pass nullptr to set the zoom factor according to the drawing extent.
tranmat Featuring API 18
[in] Transformation matrix (optional parameter).

 

Return Values

NoError
The function has completed with success
APIERR_NOPLAN
There is no any project opened
APIERR_BADDATABASE
The current database is not 2D drawing type
APIERR_BADPARS
The passed zoomBox is incorrect (empty box)

For other common API errors see the API Errors.

 

Remarks

This function is used to set the zoom box of the current 2D drawing type database. The database will not be rebuilt unless the transformation matrix is set.

To get the actual zoom box refer to the APIDb_GetZoomID function. To restore one of the previous zooms use the APIDb_ReSetZoomID function.

You can modify the zoom of the 3D model window with the APIEnv_Change3DWindowSetsID environment function.

In order to set the zoom of the top window, use the APIDo_ZoomID automation function instead.

 

Requirements

Version: API 4.1 or later
Header: APIdefs_Database.h

 

See Also

API_Box, API_Tranmat
APIDb_GetZoomID, APIDb_ReSetZoomID, APIEnv_Change3DWindowSetsID, APIDo_ZoomID
ACAPI_Database, API Functions