APIEnv_​Change3DWindowSetsID

Changes the 3D window settings.

    GSErrCode ACAPI_Environment (
        APIEnv_Change3DWindowSetsID,
        API_3DWindowInfo*     windowInfo
    );

 

Parameters

windowInfo
[in] Parameters of the 3D Window.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
windowInfo is nullptr
APIERR_NOPLAN
No open project

 

Remarks

This function is used to modify the data of the ‘3D Window Settings’ dialog box, and the size and zoom parameters of the 3D window.

In order the changes to take effect you might need to call the APIDb_RebuildCurrentDatabaseID database function.

You can also change the zoom of the 3D model window with the APIDo_ZoomID automation function.

 

Example


API_3DWindowInfo    windowInfo;
GSErrCode           err;

err = ACAPI_Environment (APIEnv_Get3DWindowSetsID, &windowInfo, nullptr, nullptr);
if (err == NoError) {
    windowInfo.model3D = API3DModel_Shading;                /* switch to shaded mode */
    windowInfo.vectSunShadow = APIVectShad_ContOn_AllSurf;  /* switch On shadow casting */
    windowInfo.hSize *= 1.5;                                /* grow 3D window size */
    windowInfo.vSize *= 1.5;
    windowInfo.setWindowSize = true;
    ACAPI_Environment (APIEnv_Change3DWindowSetsID, &windowInfo, nullptr, nullptr);
}

 

Requirements

Version: API 3.1 or later
Header: APIdefs_Environment.h

 

See Also

API_3DWindowInfo
APIEnv_Get3DWindowSetsID
APIDo_ZoomID
ACAPI_Environment
API Functions