APIEnv_​GetToolBoxInfoID

Returns information on the current state of the toolbox.

    GSErrCode ACAPI_Environment (
        APIEnv_GetToolBoxInfoID,
        API_ToolBoxInfo*     toolBoxInfo,
        bool                 enableHidden
    );

 

Parameters

toolBoxInfo
[out] Miscellaneous information on the toolbox.
enableHidden
[in] Include hidden tools from the toolbox as well. This parameter is optional; if you pass nullptr in the second parameter, it defaults to false.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
tboxInfo is nullptr.
APIERR_MEMFULL
Low memory condition.

For other common API errors see the API Errors document.

 

Remarks

You can query the current state of the toolbox with this function. It returns information on the different installed items (external tools, too), and the active toolbox item (the active tool).

The enableHidden flag tells Archicad to include hidden toolbox items as well. These are the tools which don’t have any icon in the toolbox, though using them puts Archicad into a state which works as if you chose one of the ‘real’ tools. A good example of this is the Slab Accessory.

 

Example


        ACAPI_Environment (APIEnv_GetToolBoxInfoID, &toolBoxInfo, (void *) (GS::UIntPtr) true);
        

 

Requirements

Version: API 4.1 or later
Header: APIdefs_Environment.h

 

See Also

API_ToolBoxInfo,
ACAPI_Environment,
API Functions