Archicad 28 C++ API
Loading...
Searching...
No Matches
Sights

Functions related to the handling of various 3D sights. More...

Enumerations

enum  API_3DSightID { APISight_3DModel , APISight_Floorplan }
 This is the enumeration of the applicable types of 3D sights. More...
 

Functions

GSErrCode ACAPI_Sight_Switch3DSight (API_3DSightID newSight)
 Switches between different 3D databases.
 
GSErrCode ACAPI_Sight_CreateSight (void **newSightPtr)
 Creates a new sight for 3D operations.
 
GSErrCode ACAPI_Sight_SelectSight (void *sightPtr, void **oldSightPtr)
 Switches to the supplied 3D sight for subsequent operations.
 
GSErrCode ACAPI_Sight_DeleteSight (void *sightPtr)
 Deletes the supplied sight.
 
GSErrCode ACAPI_Sight_GetCurrentWindowSight (void **sightPtr)
 Returns the current window sight.
 
GSErrCode ACAPI_Sight_GetSelectedSightModel (ModelerAPI::Model &model)
 Returns the model of the selected sight.
 

Detailed Description

Functions related to the handling of various 3D sights.

Enumeration Type Documentation

◆ API_3DSightID

This is the enumeration of the applicable types of 3D sights.

Remarks
These sight types are used with the ACAPI_Sight_Switch3DSight function; they represent the different 3D databases. Currently you can switch between the database behind the 3D window and the database coming from the floor plan representation of an element.

Function Documentation

◆ ACAPI_Sight_CreateSight()

GSErrCode ACAPI_Sight_CreateSight ( void **  newSightPtr)

Creates a new sight for 3D operations.

Parameters
newSightPtr[out] A pointer to the new sight.
Returns
  • NoError - The function has completed with success.
  • APIERR_GENERAL - The sight could not be created.
Remarks
You can switch to this newly created sight with ACAPI_Sight_SelectSight. Don't forget to delete the sight with ACAPI_Sight_DeleteSight when you are done.

◆ ACAPI_Sight_DeleteSight()

GSErrCode ACAPI_Sight_DeleteSight ( void *  sightPtr)

Deletes the supplied sight.

Parameters
sightPtr[in] A pointer to the sight to delete.
Returns
  • NoError - The function has completed with success.
  • APIERR_GENERAL - The passed sightId was invalid.
Remarks
Only pass sight pointers created with ACAPI_Sight_CreateSight to this function.

◆ ACAPI_Sight_GetCurrentWindowSight()

GSErrCode ACAPI_Sight_GetCurrentWindowSight ( void **  sightPtr)

Returns the current window sight.

Parameters
sightPtr[out] A pointer to the current window sight.
Returns
  • NoError - The function has completed with success. @

◆ ACAPI_Sight_GetSelectedSightModel()

GSErrCode ACAPI_Sight_GetSelectedSightModel ( ModelerAPI::Model &  model)

Returns the model of the selected sight.

Parameters
model[out] The model of the selected sight.
Returns
  • NoError - The function has completed with success.
  • APIERR_REFUSEDCMD - The model is not available in the current context.
  • APIERR_GENERAL - Could not construct ModelerAPI::Model. @

◆ ACAPI_Sight_SelectSight()

GSErrCode ACAPI_Sight_SelectSight ( void *  sightPtr,
void **  oldSightPtr 
)

Switches to the supplied 3D sight for subsequent operations.

Parameters
sightPtr[in] The sight to switch to. If sightPtr parameter is nullptr, then the 3D Window's sight will be selected.
oldSightPtr[out] A pointer to the previous sight.
Returns
  • NoError - The function has completed with success.
  • APIERR_GENERAL - The passed sightPtr was invalid.
Remarks
Subsequent 3D operations (like ACAPI_ModelAccess_GetNum will use the selected sight. You can also pass two special sight IDs:
Sight ID Meaning
API_PlanSight The sight of the 3D window (i.e., the 3D information returned for ACAPI_ModelAccess_GetNum) will use the element as it is on the floor plan.
API_SymbSight The sight of an object (in its 3D window).

◆ ACAPI_Sight_Switch3DSight()

GSErrCode ACAPI_Sight_Switch3DSight ( API_3DSightID  newSight)

Switches between different 3D databases.

Parameters
newSightThe ID of the sight (as value!)
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Incorrect sight ID was passed.
Remarks
This function is used to switch between the 3D database behind the real 3D window and 3D database behind the API (the 3D information for an element is coming from the floor plan). The switch usually takes no time unless the database doesn't exist or was deleted; in these cases the database is rebuilt.