Functions defining the Add-On's behavior during its lifetime, including the initial registration by Archicad, loading into memory and unloading.
More...
Functions defining the Add-On's behavior during its lifetime, including the initial registration by Archicad, loading into memory and unloading.
◆ APIDllTermHookProc
typedef void APIDllTermHookProc(void) |
Handler procedure for abnormal termination.
◆ API_AddonType
Describes the different types of add-ons.
Enumerator |
---|
APIAddon_DontRegister | Some parameters, such as the server application version, are incorrect; the add-on will not be loaded.
|
APIAddon_Normal | The add-on can operate in the current environment. This is the default return value.
|
APIAddon_Preload | The add-on requires loading when the server application starts up, such as when it needs to perform a lengthy initialization.
|
APIAddon_Unknown | The add-on type is unknown.
|
◆ API_ApplicationTypeID
The ID of the server application the add-on is called from.
Enumerator |
---|
APIAppl_ArchiCADID | Indicates that the server application is Archicad.
|
APIAppl_MEPDesignerID | Indicates that the server application is MEP Designer.
|
◆ ACAPI_KeepInMemory()
void ACAPI_KeepInMemory |
( |
bool | keepIn | ) |
|
Instructs the host application to keep the add-on in the memory after execution.
- Parameters
-
keepIn | [in] If true the add-on will stay in the memory. |
◆ ACAPI_SetDllTermHookProc()
Sets a handler procedure for the case of abnormal termination.
- Parameters
-
dllTermHookProc | [in] Handler function pointer |
◆ CheckEnvironment()
Defines the behavior of the add-on based on the current running environment.
- Parameters
-
envirParams | [in/out] Contains information on the environment. The add-on should also return a textual description of its purpose. |
- Returns
-
- Example
-
◆ FreeData()
GSErrCode FreeData |
( |
void | | ) |
|
The termination point of the addon.
- Returns
- NoError - The function has completed with success.
- Example
{
DG::UnregisterAdditionalHelpLocation (MDID_APICD, MDID_APICD_InterfaceFunctions);
return NoError;
}
◆ Initialize()
GSErrCode Initialize |
( |
void | | ) |
|
The main entry point of the add-on.
- Returns
- NoError - The initialization procedure has completed with success.
- Example
typedef struct {
double len;
Int32 index;
} NType;
GSHandle** handle;
Int32 nAlloc;
Int32 nElem;
{
IO::Location helpLoc;
DG::RegisterAdditionalHelpLocation (MDID_DeveloperID, MDID_LocalID, &helpLoc, &GS::EmptyUniString, &GS::EmptyUniString, nullptr, &GS::EmptyUniString);
if (err != NoError)
DBPrintf ("Initialize():: ACAPI_MenuItem_InstallMenuHandler failed\n");
if (err == NoError) {
}
return err;
}
◆ RegisterInterface()
GSErrCode RegisterInterface |
( |
void | | ) |
|
In this function the add-on can register its services, and menu commands.
- Returns
- NoError - The function has completed with success.
- Example
{
if (err != NoError)
return err;
SaveAs2DSupported + Open2DSupported + Merge2DSupported);
return err;
}