Archicad 28 C++ API
|
Functions to integrate the Add-On seamlessly into Archicad. They provide a way for the Add-On install callbacks to various possible events, integrate into existing dialogs (such as the Save and Open dialog) ans so on. More...
Classes | |
struct | API_MenuParams |
Describes the menu item that was chosen. More... | |
struct | API_IOParams |
Describes the file to work on in your callback procedure. More... | |
struct | API_PropertyObjectParams |
Defines parameters for the property handler function. More... | |
struct | API_AttributeManagerFormat |
Represents the data of an attribute manager format. More... | |
struct | API_PublishFormatData |
Represents the data of a publisher format. More... | |
struct | API_TranslatorNameConfig |
Represents a translator by its GUID and its name. More... | |
Typedefs | |
typedef GSErrCode | APIMenuCommandProc(const API_MenuParams *menuParams) |
User supplied callback procedure for handling menu commands. | |
typedef GSErrCode | APIIOCommandProc(const API_IOParams *ioParams) |
User supplied callback procedure for handling I/O operations. | |
typedef GSErrCode | APIIO3DCommandProc(const API_IOParams *ioParams, Modeler::SightPtr sight) |
User supplied callback procedure for handling I/O operations. | |
typedef GSErrCode | APIPanelCreateProc(Int32 refCon, const void *tabControl, void *data, void **tabPage) |
Callback procedure for creating custom tabpages. | |
typedef GSErrCode | APIPanelDestroyProc(Int32 refCon, void *tabPage) |
Callback procedure for destroying custom tabpages. | |
typedef GSErrCode | APIESYMCommandProc(const API_ESYMParams *esymParams) |
User supplied callback function for handling external symbols. | |
typedef GSErrCode | APIModulCommandProc(GSHandle params, GSPtr resultData, bool silentMode) |
User supplied callback procedure for handling calls from other add-ons. | |
typedef GSErrCode | APIPropertyObjectCommandProc(API_PropertyObjectParams *propertyParams) |
Callback function to handle the different property assignments. | |
typedef GSErrCode | APISettingsCreateProc(void *uiData) |
Callback procedure for handle settings dialog create event. | |
typedef GSErrCode | APISettingsDestroyProc(void *uiData) |
Callback procedure for handle settings dialog destroy event. | |
typedef GSErrCode | APIPublishFormatCommandProc(void *uiData) |
Callback procedure for handle publish format command. | |
typedef GSErrCode | APIModulDataMergeHandlerProc(API_MDSetCmd mode, const GS::UniString &modulName, const API_ModulData *originalInfo, const API_ModulData *toMergeInfo, API_ModulData *destInfo) |
User supplied callback procedure for handling module data merge operations. | |
typedef GSErrCode | APIModulDataSaveOldFormatHandlerProc(API_FTypeID planFileType, GS::HashTable< GS::UniString, API_ModulData * > &modulesToSave) |
User supplied callback procedure for converting modules into previous format. | |
typedef GSErrCode | APIElemSetSaveOldFormatHandlerProc(API_FTypeID planFileType, GSConstPtr dataPtr, GSPtr *oldDataPtr) |
User supplied callback function for handling backward conversion on user data attached to elements. | |
typedef GSErrCode | APINavigatorAddOnViewPointDataMergeHandlerProc(const GS::Array< API_NavigatorAddOnViewPointData > &sourceVPDataArray) |
User supplied callback procedure for handling Navigator AddOn viewpoint merge operations. | |
typedef GSErrCode | APINavigatorAddOnViewPointDataSaveOldFormatHandlerProc(API_FTypeID planFileType, const GS::Array< API_NavigatorAddOnViewPointData > ¤tFormatVPDataArray, GS::Array< API_NavigatorAddOnViewPointData > &oldFormatVPDataArray) |
User supplied callback procedure for converting Navigator AddOn viewpoints into older format. | |
typedef GSErrCode | APINavigatorAddOnViewPointDataConvertNewFormatHandlerProc(API_FTypeID planFileType, const GS::Array< API_NavigatorAddOnViewPointData > &oldFormatVPDataArray, GS::Array< API_NavigatorAddOnViewPointData > ¤tFormatVPDataArray) |
User supplied callback procedure for converting Navigator AddOn viewpoints into current format. | |
typedef bool | APIClassificationVisibilityHandlerProc(API_ClassificationVisibilityMode visibilityMode, const GS::Array< API_Guid > &classificationGuids, const API_Guid &classificationItemGuid) |
Callback function to handle the visibility of a classification. | |
typedef bool | APIPropertyVisibilityHandlerProc(API_PropertyVisibilityMode visibilityMode, const GS::Array< API_Guid > &classificationGuids, const API_Guid &propertyDefinitionGuid) |
Callback function to handle the visibility of a property. | |
typedef GSErrCode | APIPaletteControlCallBackProc(Int32 referenceID, API_PaletteMessageID messageID, GS::IntPtr param) |
User supplied callback function for handling special messages for modeless palettes. | |
Functions | |
GSErrCode | ACAPI_AddOnAddOnCommunication_RegisterSupportedService (GSType cmdID, Int32 cmdVersion) |
Registers a command which can be used by other add-ons. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterRequiredService (const API_ModulID *modulID, GSType cmdID, Int32 cmdVersion) |
Check the availability of an other add-on's command. | |
GSErrCode | ACAPI_MenuItem_RegisterMenu (short menuStrResID, short promptStrResID, APIMenuCodeID menuPosCode, GSFlags menuFlags) |
Registers the menu items of the add-on. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterFileType (Int32 refCon, GSType ftype, GSType fcreator, const char *extname, short iconResID, short descStrResID, short descStrResItemID, API_IOMethod methodFlags) |
Registers a file type for I/O type add-ons. | |
GSErrCode | ACAPI_LibraryPart_RegisterSubtype (GSType signature, short templateFileResID, bool transparentNode, short stringResID, short smallIconResID, short largeIconResID, API_TBoxGroup toolGroupId, API_TBoxEnabled enableFlags, short defaultsResID) |
Registers a new library part subtype. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterSettingsPanel (Int32 refCon, const API_ElemType &tool, short iconId, short stringId, short pageId, short growType=0, bool visibleByDefault=false) |
Appends a custom panel to an element settings dialog. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterAttributePanel (Int32 refCon, API_AttrTypeID attr, short iconId, short stringId, short pageId, short growType=0) |
Appends a custom panel to an attribute settings dialog. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterInfoBoxPanel (Int32 refCon, const API_ElemType &tool, short stringId, short pageId, bool visibleByDefault=false) |
Appends a custom panel to the info box. | |
GSErrCode | ACAPI_LibraryPart_RegisterESYM (GSType signature, API_LibTypeID typeID, short stringResID) |
Registers an external symbol type with Archicad. | |
GSErrCode | ACAPI_Property_RegisterPropertyObjectHandler (short assignStrResID) |
Registers a property handler. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterBuiltInLibrary (void) |
Registers built-in library parts to be loaded. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterModulDataHandler (void) |
Registers the add-on to be called for merging and converting its moduldata. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterClassificationVisibilityHandler (void) |
Tells Archicad that your add-on wants to modify classification visibility. | |
GSErrCode | ACAPI_Property_RegisterPropertyVisibilityHandler (void) |
Tells Archicad that your add-on wants to modify property visibility. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterNavigatorAddOnViewPointDataHandler (void) |
Registers the add-on to be called when Navigator AddOn viewpoints are merged, saved to older format, or converted from older format to current format. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterSettingsObserver (const API_ElemType &tool) |
Create an observer to an element settings dialog. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterAttributeImportFormat (const API_AttributeManagerFormat &formatData) |
Registers an attribute manager format which can be used in attribute manager import. | |
GSErrCode | ACAPI_AddOnIntegration_RegisterPublishFormat (const API_PublishFormatData &formatData) |
Registers a publish format which can be used in publisher tree. | |
GSErrCode | ACAPI_AddOnIntegration_InstallModulCommandHandler (GSType cmdID, Int32 cmdVersion, APIModulCommandProc *handlerProc) |
Installs a callback for handling command calls from other add-ons. | |
GSErrCode | ACAPI_MenuItem_InstallMenuHandler (short menuStrResID, APIMenuCommandProc *handlerProc) |
Installs a callback procedure for handling the add-on's menu commands. | |
GSErrCode | ACAPI_AddOnIntegration_InstallFileTypeHandler (GSType cmdID, APIIOCommandProc *handlerProc) |
Installs a callback procedure for handling file operations. | |
GSErrCode | ACAPI_AddOnIntegration_InstallFileTypeHandler3D (GSType cmdID, APIIO3DCommandProc *handlerProc) |
Installs a callback procedure for handling file operations. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPanelHandler (Int32 refCon, APIPanelCreateProc *handlerCreateProc, APIPanelDestroyProc *handlerDestroyProc) |
Installs the creation and destroy handlers for the registered custom settings panel. | |
GSErrCode | ACAPI_LibraryPart_InstallESYMHandler (GSType signature, APIESYMCommandProc *handlerProc) |
Installs a callback for handling external symbols. | |
GSErrCode | ACAPI_Property_InstallPropertyObjectHandler (short strResID, APIPropertyObjectCommandProc *propertyCommandProc) |
Installs the property handler function for the given menu item. | |
GSErrCode | ACAPI_AddOnIntegration_InstallModulDataMergeHandler (APIModulDataMergeHandlerProc *mergeHandlerProc) |
Installs a callback procedure for handling the module data merge operations. | |
GSErrCode | ACAPI_AddOnIntegration_InstallModulDataSaveOldFormatHandler (APIModulDataSaveOldFormatHandlerProc *modulDataSaveOldFormatProc) |
Installs a callback procedure for converting module data into older format. | |
GSErrCode | ACAPI_AddOnIntegration_InstallElemSetSaveOldFormatHandler (APIElemSetSaveOldFormatHandlerProc *elemSetSaveOldFormatProc) |
Installs a callback procedure for handling the converison of the user data, the addOn attached to an elemeset. | |
GSErrCode | ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataMergeHandler (APINavigatorAddOnViewPointDataMergeHandlerProc *mergeHandlerProc) |
Installs a callback procedure for handling the Navigator AddOn viewpoint merge operations. | |
GSErrCode | ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataSaveOldFormatHandler (APINavigatorAddOnViewPointDataSaveOldFormatHandlerProc *saveOldFormatProc) |
Installs a callback procedure for converting Navigator AddOn viewpoints into older format. | |
GSErrCode | ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataConvertNewFormatHandler (APINavigatorAddOnViewPointDataConvertNewFormatHandlerProc *convertNewFormatProc) |
Installs a callback procedure for converting Navigator AddOn viewpoints into current format. | |
GSErrCode | ACAPI_AddOnIntegration_InstallSettingsHandler (const API_ElemType &tool, APISettingsCreateProc *handlerCreateProc, APISettingsDestroyProc *handlerDestroyProc) |
Installs the create and destroy handlers for the registered settings observer. | |
GSErrCode | ACAPI_AddOnIntegration_InstallClassificationVisibilityHandler (APIClassificationVisibilityHandlerProc *handlerProc) |
Installs the classification visibility handler function. | |
GSErrCode | ACAPI_Property_InstallPropertyVisibilityHandler (APIPropertyVisibilityHandlerProc *handlerProc) |
Installs the property visibility handler function. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPublisherSaveMethod (const char *mimeType, SaveProc *saveProc) |
Installs the save methods for the Publisher. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPublisherSaveOption (const char *mimeType, SaveOptionProc *saveOptionProc) |
Installs the option methods for the Publisher. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPublisherTranslatorGetter (const char *mimeType, TranslatorGetterProc *translatorGetterProc) |
Installs the translator getter function for the Publisher. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPublisherDefaultTranslatorGetter (const char *mimeType, DefaultTranslatorGetterProc *defaultTranslatorGetterProc) |
Installs the default translator getter function for the Publisher. | |
GSErrCode | ACAPI_AddOnIntegration_InstallPublisherFormatInfoGetter (const char *mimeType, InfoGetterProc *infoGetterProc) |
Installs the format info getter function for the Publisher. | |
GSErrCode | ACAPI_AddOnIntegration_InstallAttrManagerImportMethod (const GS::UniString &fileExtension, ImportAttrProc *importProc) |
Installs the import method for the Attribute Manager. | |
void | ACAPI_KeepInMemory (bool keepIn) |
Instructs the host application to keep the add-on in the memory after execution. | |
GSErrCode | ACAPI_RegisterModelessWindow (Int32 referenceID, APIPaletteControlCallBackProc *callBackProc, GSFlags controlFlags, const API_Guid &paletteGuid=APINULLGuid) |
Registers a modeless palette in the API. | |
GSErrCode | ACAPI_ActivatePropertyObjectHandler (short strResID, bool active) |
Activates or deactivates an add-on's property handler. | |
Functions to integrate the Add-On seamlessly into Archicad. They provide a way for the Add-On install callbacks to various possible events, integrate into existing dialogs (such as the Save and Open dialog) ans so on.
typedef bool APIClassificationVisibilityHandlerProc(API_ClassificationVisibilityMode visibilityMode, const GS::Array< API_Guid > &classificationGuids, const API_Guid &classificationItemGuid) |
Callback function to handle the visibility of a classification.
visibilityMode | [in] specifies what should the callback function return. Has one of the following values:
| ||||||
classificationGuids | [in] the classification guids of the current element. | ||||||
classificationItemGuid | [in] the guid of the current classification. |
typedef GSErrCode APIElemSetSaveOldFormatHandlerProc(API_FTypeID planFileType, GSConstPtr dataPtr, GSPtr *oldDataPtr) |
User supplied callback function for handling backward conversion on user data attached to elements.
planFileType | [in] File type's ID of the save process |
dataPtr | [in] Pointer to the attached user data |
oldDataPtr | [out] Pointer to the backward converted user data |
oldDataPtr
is nullptr on call, and should be allocated in the function. If it is nullptr on return, the used data will be deleted from the saved plan. typedef GSErrCode APIESYMCommandProc(const API_ESYMParams *esymParams) |
User supplied callback function for handling external symbols.
esymParams | [in] This structure contains the various parameters identifying the external symbol (type, index) and the type of operation (new/edit). |
typedef GSErrCode APIIO3DCommandProc(const API_IOParams *ioParams, Modeler::SightPtr sight) |
User supplied callback procedure for handling I/O operations.
ioParams | [in] This structure contains the various parameters identifying the file to be opened or saved. |
sight | [in] The 3D sight pointer. |
typedef GSErrCode APIIOCommandProc(const API_IOParams *ioParams) |
User supplied callback procedure for handling I/O operations.
ioParams | [in] This structure contains the various parameters identifying the file to be opened or saved. |
typedef GSErrCode APIMenuCommandProc(const API_MenuParams *menuParams) |
User supplied callback procedure for handling menu commands.
menuParams | [in] This structure contains the various parameters identifying the menu command. |
typedef GSErrCode APIModulCommandProc(GSHandle params, GSPtr resultData, bool silentMode) |
User supplied callback procedure for handling calls from other add-ons.
params | [in/out] This structure contains the parameters of the command passed onto your add-on. |
resultData | [out] This structure contains parameters passed back to the caller add-on. |
silentMode | [in] This flag tells the add-on to work "silently", i.e. skip all dialogs and warning messages. |
typedef GSErrCode APIModulDataMergeHandlerProc(API_MDSetCmd mode, const GS::UniString &modulName, const API_ModulData *originalInfo, const API_ModulData *toMergeInfo, API_ModulData *destInfo) |
User supplied callback procedure for handling module data merge operations.
mode | [in] The operation the add-on is called for. |
modulName | [in] Identifier name of the modul data (for modules stored in previous versions this parameter is always empty string). |
originalInfo | [in] The original module data in the to which data has to be merged into. |
toMergeInfo | [in] The incoming module data. |
destInfo | [out] The result module data. Your add-on should put the result of the merge in here. |
typedef GSErrCode APIModulDataSaveOldFormatHandlerProc(API_FTypeID planFileType, GS::HashTable< GS::UniString, API_ModulData * > &modulesToSave) |
User supplied callback procedure for converting modules into previous format.
planFileType | [in] The old format plan version the project is being saved. In Archicad 13 this can be only APIFType_PlanFile1200 . |
modulesToSave | [out] A hash table to retrieve the converted module data. |
typedef GSErrCode APINavigatorAddOnViewPointDataConvertNewFormatHandlerProc(API_FTypeID planFileType, const GS::Array< API_NavigatorAddOnViewPointData > &oldFormatVPDataArray, GS::Array< API_NavigatorAddOnViewPointData > ¤tFormatVPDataArray) |
User supplied callback procedure for converting Navigator AddOn viewpoints into current format.
planFileType | [in] The old format plan version being opened. |
oldFormatVPDataArray | [in] Navigator AddOn viewpoints in old format. |
currentFormatVPDataArray | [out] Navigator AddOn viewpoints in current format. These will be visible after the plan finished opening. |
currentFormatVPDataArray
. When Archicad calls this function, it passes an empty currentFormatVPDataArray
. If you need to delete a Navigator AddOn viewpoint (e.g. it cannot be converted to current version) then simply do not push it into currentFormatVPDataArray
. Note, that if you do not push a root or group, all its descendants will be deleted, even if some descendants were pushed into currentFormatVPDataArray. If you push a viewpoint data with an invalid guid (i.e. one that does not designate an existing root, group or leaf node), it will be skipped, and not created. Order of the items in currentFormatVPDataArray
is irrelevant. The hierarchy cannot be changed during conversion. The parentGuid of the pushed structures will be ignored. The item type of the Navigator viewpoints cannot be changed during conversion. The itemType of the pushed structures will be ignored. typedef GSErrCode APINavigatorAddOnViewPointDataMergeHandlerProc(const GS::Array< API_NavigatorAddOnViewPointData > &sourceVPDataArray) |
User supplied callback procedure for handling Navigator AddOn viewpoint merge operations.
sourceVPDataArray | [in] The list of the Navigator AddOn viewpoints to be merged. These viewpoint roots, groups or leaf nodes come from the merged plan file. |
typedef GSErrCode APINavigatorAddOnViewPointDataSaveOldFormatHandlerProc(API_FTypeID planFileType, const GS::Array< API_NavigatorAddOnViewPointData > ¤tFormatVPDataArray, GS::Array< API_NavigatorAddOnViewPointData > &oldFormatVPDataArray) |
User supplied callback procedure for converting Navigator AddOn viewpoints into older format.
planFileType | [in] The old format plan version, the project is being saved into. |
currentFormatVPDataArray | [in] Navigator AddOn viewpoints in current format. |
oldFormatVPDataArray | [out] Navigator AddOn viewpoints in old format. This will be saved into the old format plan. |
oldFormatVPDataArray
. When Archicad calls this function, it passes an empty oldFormatVPDataArray
. If you need to delete a Navigator AddOn viewpoint (e.g. it cannot be converted to previous version) then simply do not push it into oldFormatVPDataArray
. Note, that if you do not push a root or group, all its descendants will be deleted, even if some descendants were pushed into oldFormatVPDataArray
. If you push a viewpoint data with an invalid guid (i.e. one that does not designate an existing root, group or leaf node), it will be skipped, and not created. Order of the items in oldFormatVPDataArray
is irrelevant. The hierarchy cannot be changed during conversion. The parentGuid of the pushed structures will be ignored. The item type of the Navigator viewpoints cannot be changed during conversion. The itemType of the pushed structures will be ignored. typedef GSErrCode APIPaletteControlCallBackProc(Int32 referenceID, API_PaletteMessageID messageID, GS::IntPtr param) |
User supplied callback function for handling special messages for modeless palettes.
referenceID | [in] The unique ID that identifies the modeless palette. |
messageID | [in] Event to be handled in the palette control callback procedure. |
param | [out] Return parameter, used for APIPalMsg_IsPaletteVisible . |
Message type | Description |
---|---|
APIPalMsg_ClosePalette | The API asks the add-on to close its palette. |
APIPalMsg_HidePalette_Begin | Your palette should be hidden for some reason, e.g. the user chose Hide All Palettes from the menu. |
APIPalMsg_HidePalette_End | The palette can be shown again if needed. |
APIPalMsg_DisableItems_Begin | Certain palette items should be disabled, because the user is performing an input. This is necessary because you shouldn't make any modifications to the database during input. |
APIPalMsg_DisableItems_End | The reason behind APIPalMsg_DisableItems_Begin is gone; you can enable the items on the palette. |
APIPalMsg_OpenPalette | Sent when the palette should be opened automatically as set in the Work Environment. Your palette should pass a GUID when created: DG::Palette (resourceId, paletteGuid) to make this work. |
APIPalMsg_IsPaletteVisible | The Work Environment queries the palette for its visibility status on closing the current document/quitting the application. If you return true in param (really a bool*), then Archicad will send a APIPalMsg_OpenPalette to your add-on on next launch, so that you can re-open your add-on's palette. |
typedef GSErrCode APIPanelCreateProc(Int32 refCon, const void *tabControl, void *data, void **tabPage) |
Callback procedure for creating custom tabpages.
refCon | [in] reference number passed by the panel registration function |
tabControl | [in] pointer to the constructed DG::TabControl dialog item |
data | [in] pointer to an interface which provides access to the user data |
tabPage | [out] pointer to the tabpage object instance created in the callback function |
typedef GSErrCode APIPanelDestroyProc(Int32 refCon, void *tabPage) |
Callback procedure for destroying custom tabpages.
refCon | [in] reference number passed by the panel registration function |
tabPage | [in] pointer to the tabpage object instance |
typedef GSErrCode APIPropertyObjectCommandProc(API_PropertyObjectParams *propertyParams) |
Callback function to handle the different property assignments.
propertyParams | [in] the parameters of the property assignment. |
typedef bool APIPropertyVisibilityHandlerProc(API_PropertyVisibilityMode visibilityMode, const GS::Array< API_Guid > &classificationGuids, const API_Guid &propertyDefinitionGuid) |
Callback function to handle the visibility of a property.
visibilityMode | [in] specifies what should the callback function return. Has one of the following values:
| ||||||
classificationGuids | [in] the classification guids of the current element. | ||||||
propertyDefinitionGuid | [in] the guid of the current property. |
typedef GSErrCode APIPublishFormatCommandProc(void *uiData) |
Callback procedure for handle publish format command.
uiData | [in/out] pointer to the tool UI data. |
typedef GSErrCode APISettingsCreateProc(void *uiData) |
Callback procedure for handle settings dialog create event.
uiData | [in/out] pointer to the tool UI data. This UI data can be used to get the current settings and to attach an observer which monitors changes of the settings dialog. |
typedef GSErrCode APISettingsDestroyProc(void *uiData) |
Callback procedure for handle settings dialog destroy event.
uiData | [in/out] pointer to the tool UI data. |
GSErrCode ACAPI_ActivatePropertyObjectHandler | ( | short | strResID, |
bool | active | ||
) |
Activates or deactivates an add-on's property handler.
strResID | [in] tells for which property handler is this command issued |
active | [in] turns the property handler on/off |
GSErrCode ACAPI_AddOnAddOnCommunication_RegisterSupportedService | ( | GSType | cmdID, |
Int32 | cmdVersion | ||
) |
Registers a command which can be used by other add-ons.
cmdID | [in] The command identifier of the supported service. |
cmdVersion | [in] The command version of the supported service. |
GSErrCode ACAPI_AddOnIntegration_InstallAttrManagerImportMethod | ( | const GS::UniString & | fileExtension, |
ImportAttrProc * | importProc | ||
) |
Installs the import method for the Attribute Manager.
fileExtension | The unique file extension which identifies the new import format. |
importProc | Callback function, called when import a file with the registered extension. |
GSErrCode ACAPI_AddOnIntegration_InstallClassificationVisibilityHandler | ( | APIClassificationVisibilityHandlerProc * | handlerProc | ) |
Installs the classification visibility handler function.
handlerProc | [in] The classification visibility handler function. |
GSErrCode ACAPI_AddOnIntegration_InstallElemSetSaveOldFormatHandler | ( | APIElemSetSaveOldFormatHandlerProc * | elemSetSaveOldFormatProc | ) |
Installs a callback procedure for handling the converison of the user data, the addOn attached to an elemeset.
elemSetSaveOldFormatProc | [in] The callback function to handle the backward conversion |
GSErrCode ACAPI_AddOnIntegration_InstallFileTypeHandler | ( | GSType | cmdID, |
APIIOCommandProc * | handlerProc | ||
) |
Installs a callback procedure for handling file operations.
cmdID | [in] An identifier of the file type to install the callback procedure for. This should be the same what you used in the ACAPI_AddOnIntegration_RegisterFileType as a reference number in the RegisterInterface function. |
handlerProc | [in] The callback function to handle the different file operations. |
GSErrCode ACAPI_AddOnIntegration_InstallFileTypeHandler3D | ( | GSType | cmdID, |
APIIO3DCommandProc * | handlerProc | ||
) |
Installs a callback procedure for handling file operations.
cmdID | [in] An identifier of the file type to install the callback procedure for. This should be the same what you used in the ACAPI_AddOnIntegration_RegisterFileType as a reference number in the RegisterInterface function. |
handlerProc | [in] The callback function to handle the different file operations. |
GSErrCode ACAPI_AddOnIntegration_InstallModulCommandHandler | ( | GSType | cmdID, |
Int32 | cmdVersion, | ||
APIModulCommandProc * | handlerProc | ||
) |
Installs a callback for handling command calls from other add-ons.
cmdID | [in] An identifier of the command to install the callback procedure for. This should be the same what you used in the ACAPI_AddOnAddOnCommunication_RegisterSupportedService as the command identifier in the RegisterInterface function. |
cmdVersion | [in] An identifier of the command to install the callback procedure for. This should be the same what you used in the ACAPI_AddOnAddOnCommunication_RegisterSupportedService as the command version number in the RegisterInterface function. |
handlerProc | [in] The callback function to handle the command calls. |
GSErrCode ACAPI_AddOnIntegration_InstallModulDataMergeHandler | ( | APIModulDataMergeHandlerProc * | mergeHandlerProc | ) |
Installs a callback procedure for handling the module data merge operations.
mergeHandlerProc | [in] The callback procedure which will handle the module data merge. Can be nullptr ; this removes the installed callback. |
GSErrCode ACAPI_AddOnIntegration_InstallModulDataSaveOldFormatHandler | ( | APIModulDataSaveOldFormatHandlerProc * | modulDataSaveOldFormatProc | ) |
Installs a callback procedure for converting module data into older format.
modulDataSaveOldFormatProc | [in] The callback procedure to convert module data. Passing nullptr in this parameter uninstalls the previously installed handler function. |
GSErrCode ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataConvertNewFormatHandler | ( | APINavigatorAddOnViewPointDataConvertNewFormatHandlerProc * | convertNewFormatProc | ) |
Installs a callback procedure for converting Navigator AddOn viewpoints into current format.
convertNewFormatProc | [in] The callback procedure which will handle the Navigator AddOn viewpoints' conversion into current format. If nullptr is passed, an installed callback function is removed. |
GSErrCode ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataMergeHandler | ( | APINavigatorAddOnViewPointDataMergeHandlerProc * | mergeHandlerProc | ) |
Installs a callback procedure for handling the Navigator AddOn viewpoint merge operations.
mergeHandlerProc | [in] The callback procedure which will handle the Navigator AddOn viewpoint data merge. If nullptr is passed, an installed callback function is removed. |
GSErrCode ACAPI_AddOnIntegration_InstallNavigatorAddOnViewPointDataSaveOldFormatHandler | ( | APINavigatorAddOnViewPointDataSaveOldFormatHandlerProc * | saveOldFormatProc | ) |
Installs a callback procedure for converting Navigator AddOn viewpoints into older format.
saveOldFormatProc | [in] The callback procedure which will handle the Navigator AddOn viewpoints' conversion into older format. If nullptr is passed, an installed callback function is removed. |
GSErrCode ACAPI_AddOnIntegration_InstallPanelHandler | ( | Int32 | refCon, |
APIPanelCreateProc * | handlerCreateProc, | ||
APIPanelDestroyProc * | handlerDestroyProc | ||
) |
Installs the creation and destroy handlers for the registered custom settings panel.
refCon | [in] Panel reference number |
handlerCreateProc | [in] Callback function, called when the panel is created. |
handlerDestroyProc | [in] Callback function, called when the panel is destroyed. |
GSErrCode ACAPI_AddOnIntegration_InstallPublisherDefaultTranslatorGetter | ( | const char * | mimeType, |
DefaultTranslatorGetterProc * | defaultTranslatorGetterProc | ||
) |
Installs the default translator getter function for the Publisher.
mimeType | The unique mimeType which identifies the new publish format |
defaultTranslatorGetterProc | Callback function, called from the Organizer |
GSErrCode ACAPI_AddOnIntegration_InstallPublisherFormatInfoGetter | ( | const char * | mimeType, |
InfoGetterProc * | infoGetterProc | ||
) |
Installs the format info getter function for the Publisher.
mimeType | The unique mimeType which identifies the new publish format |
infoGetterProc | Callback function, called from the Organizer |
GSErrCode ACAPI_AddOnIntegration_InstallPublisherSaveMethod | ( | const char * | mimeType, |
SaveProc * | saveProc | ||
) |
Installs the save methods for the Publisher.
mimeType | The unique mimeType which identifies the new publish format |
saveProc | Callback function, called in case of publishing |
GSErrCode ACAPI_AddOnIntegration_InstallPublisherSaveOption | ( | const char * | mimeType, |
SaveOptionProc * | saveOptionProc | ||
) |
Installs the option methods for the Publisher.
mimeType | The unique mimeType which identifies the new publish format |
saveOptionProc | Callback function, called in case of publishing |
API_Userdata
structures. Example Refer to the Format Register Test example project of the API Development Kit. GSErrCode ACAPI_AddOnIntegration_InstallPublisherTranslatorGetter | ( | const char * | mimeType, |
TranslatorGetterProc * | translatorGetterProc | ||
) |
Installs the translator getter function for the Publisher.
mimeType | The unique mimeType which identifies the new publish format |
translatorGetterProc | Callback function, called from the Organizer |
GSErrCode ACAPI_AddOnIntegration_InstallSettingsHandler | ( | const API_ElemType & | tool, |
APISettingsCreateProc * | handlerCreateProc, | ||
APISettingsDestroyProc * | handlerDestroyProc | ||
) |
Installs the create and destroy handlers for the registered settings observer.
tool | [in] The element type that identifies the settings dialog |
handlerCreateProc | [in] Callback function, called when the settings dialog is created. |
handlerDestroyProc | [in] Callback function, called when the settings dialog is destroyed. |
ACAPI_AddOnIntegration_InstallSettingsHandler
function should be called from Initialize. The 'create' handler is called when the settings dialog is created. The 'destroy' handler is called when the settings dialog is destroyed. From version 26 the tool and variation parameters were merged into a single API_ElemType parameter. GSErrCode ACAPI_AddOnIntegration_RegisterAttributeImportFormat | ( | const API_AttributeManagerFormat & | formatData | ) |
Registers an attribute manager format which can be used in attribute manager import.
formatData | [in] Stores parameters of the new attribute manager import format. |
GSErrCode ACAPI_AddOnIntegration_RegisterAttributePanel | ( | Int32 | refCon, |
API_AttrTypeID | attr, | ||
short | iconId, | ||
short | stringId, | ||
short | pageId, | ||
short | growType = 0 |
||
) |
Appends a custom panel to an attribute settings dialog.
refCon | [in] Unique reference number chosen for this panel |
attr | [in] The attribute type that identifies the settings dialog |
iconId | [in] Panel icon resource ID |
stringId | [in] Title text to appear in the handler area of the panel |
pageId | [in] Dialog resource ID of the tabpage |
growType | [in] Grow type of the tab page: can be DG_DLG_NOGROW, DG_DLG_HGROW, DG_DLG_VGROW, or DG_DLG_HGROW | DG_DLG_VGROW. This parameter is optional, the default is DG_DLG_NOGROW. |
GSErrCode ACAPI_AddOnIntegration_RegisterBuiltInLibrary | ( | void | ) |
Registers built-in library parts to be loaded.
GSErrCode ACAPI_AddOnIntegration_RegisterClassificationVisibilityHandler | ( | void | ) |
Tells Archicad that your add-on wants to modify classification visibility.
GSErrCode ACAPI_AddOnIntegration_RegisterFileType | ( | Int32 | refCon, |
GSType | ftype, | ||
GSType | fcreator, | ||
const char * | extname, | ||
short | iconResID, | ||
short | descStrResID, | ||
short | descStrResItemID, | ||
API_IOMethod | methodFlags | ||
) |
Registers a file type for I/O type add-ons.
refCon | [in] An arbitrary number which identifies this file type within the add-on. |
ftype | [in] Macintosh file type (e.g. 'TEXT'). |
fcreator | [in] Creator on Macintosh (e.g. 'GSAC' for Archicad). |
extname | [in] The extension used on Windows (e.g. "txt"). |
iconResID | [in] An optional icon resource ID. This icon appears in the Open/Save dialogs on the Macintosh. |
descStrResID | [in] The resource ID of the resource containing the description of the file type. |
descStrResItemID | [in] The item ID within the resource of the item containing the description of the file type, or 0 when specifying MIME type as well (see Remarks). |
methodFlags | [in] Flags describing the Open/Save dialogs to add this file type to (see Remarks). |
Flag | File Dialog |
---|---|
Open2DSupported | Open as 2D |
Merge2DSupported | Merge |
OpenLibPartSupported | Open Library Item |
SaveAs2DSupported | Save as 2D |
SaveAs3DSupported | Save as 3D |
SaveAsFlySupported | Create Fly-Through/Sun Study |
Import2DDrawingSupported | Import as Drawing |
From API v4.2 you have the possibility to register the MIME type for the file as well. MIME (Multipurpose Internet Mail Extension) types are commonly accepted identifiers for certain media types. Specifying the MIME type makes the file format identification more accurate in the File Type Manager. If you decide to use this feature, you can do this in the following way:
GSErrCode ACAPI_AddOnIntegration_RegisterInfoBoxPanel | ( | Int32 | refCon, |
const API_ElemType & | tool, | ||
short | stringId, | ||
short | pageId, | ||
bool | visibleByDefault = false |
||
) |
Appends a custom panel to the info box.
refCon | [in] Unique reference number chosen for this panel |
tool | [in] The element type that identifies the settings dialog |
stringId | [in] Title text to appear in the handler area of the panel |
pageId | [in] Dialog resource ID of the tabpage |
visibleByDefault | [in] Show or hide the panel by default (optional parameter, false if omitted) |
GSErrCode ACAPI_AddOnIntegration_RegisterModulDataHandler | ( | void | ) |
Registers the add-on to be called for merging and converting its moduldata.
GSErrCode ACAPI_AddOnIntegration_RegisterNavigatorAddOnViewPointDataHandler | ( | void | ) |
Registers the add-on to be called when Navigator AddOn viewpoints are merged, saved to older format, or converted from older format to current format.
GSErrCode ACAPI_AddOnIntegration_RegisterPublishFormat | ( | const API_PublishFormatData & | formatData | ) |
Registers a publish format which can be used in publisher tree.
formatData | [in] Stores parameters of the new publish format |
GSErrCode ACAPI_AddOnIntegration_RegisterRequiredService | ( | const API_ModulID * | modulID, |
GSType | cmdID, | ||
Int32 | cmdVersion | ||
) |
Check the availability of an other add-on's command.
modulID | [in] The modul ID of the add-on containing the required service. |
cmdID | [in] The command identifier of the required service. |
cmdVersion | [in] The command version of the required service. |
GSErrCode ACAPI_AddOnIntegration_RegisterSettingsObserver | ( | const API_ElemType & | tool | ) |
Create an observer to an element settings dialog.
tool | [in] The element type that identifies the settings dialog |
API_ElemType
parameter. GSErrCode ACAPI_AddOnIntegration_RegisterSettingsPanel | ( | Int32 | refCon, |
const API_ElemType & | tool, | ||
short | iconId, | ||
short | stringId, | ||
short | pageId, | ||
short | growType = 0 , |
||
bool | visibleByDefault = false |
||
) |
Appends a custom panel to an element settings dialog.
refCon | [in] Unique reference number chosen for this panel |
tool | [in] The element type that identifies the settings dialog |
iconId | [in] Panel icon resource ID |
stringId | [in] Title text to appear in the handler area of the panel |
pageId | [in] Dialog resource ID of the tabpage |
growType | [in] Grow type of the tab page: can be DG_DLG_NOGROW, DG_DLG_HGROW, DG_DLG_VGROW, or DG_DLG_HGROW | DG_DLG_VGROW. This parameter is optional, the default is DG_DLG_NOGROW. |
visibleByDefault | [in] Show or hide the panel by default (optional parameter, false if omitted) |
API_ElemType
parameter. void ACAPI_KeepInMemory | ( | bool | keepIn | ) |
Instructs the host application to keep the add-on in the memory after execution.
keepIn | [in] If true the add-on will stay in the memory. |
GSErrCode ACAPI_LibraryPart_InstallESYMHandler | ( | GSType | signature, |
APIESYMCommandProc * | handlerProc | ||
) |
Installs a callback for handling external symbols.
signature | [in] A four-character identifier of the external symbol. |
handlerProc | [in] The callback function to handle the creation and the editing of the external symbol. |
GSErrCode ACAPI_LibraryPart_RegisterESYM | ( | GSType | signature, |
API_LibTypeID | typeID, | ||
short | stringResID | ||
) |
Registers an external symbol type with Archicad.
signature | [in] Unique identifier of the new symbol type (a four-character ID). |
typeID | [in] Type of the new symbol (can be API_ObjectID , API_LampID , API_WindowID , or API_DoorID ). |
stringResID | [in] Resource containing the description of the new symbol type. |
GSErrCode ACAPI_LibraryPart_RegisterSubtype | ( | GSType | signature, |
short | templateFileResID, | ||
bool | transparentNode, | ||
short | stringResID, | ||
short | smallIconResID, | ||
short | largeIconResID, | ||
API_TBoxGroup | toolGroupId, | ||
API_TBoxEnabled | enableFlags, | ||
short | defaultsResID | ||
) |
Registers a new library part subtype.
signature | [in] A four-character identifier of this library part subtype |
templateFileResID | [in] 'FILE' resource ID of the subtype template library part compiled into the add-on |
transparentNode | [in] Objects of this subtype can be shown on higher ancestry levels as well |
stringResID | [in] Resource ID of the library part subtype description string |
smallIconResID | [in] Resource ID of the small-sized toolbox (toolbar) item icon |
largeIconResID | [in] Resource ID of the large-sized toolbox item icon |
toolGroupId | [in] Toolbox item position |
enableFlags | [in] Enable or disable the subtype tool depending on the active window |
defaultsResID | [in] ID of the 'ACP0' resource that contains the element default values for this subtype |
API_TBoxGroup | Meaning |
---|---|
TBoxGroup_Root | The subtype tool item will be appended to the group of model element tools |
TBoxGroup_Objects | The subtype tool item will be added to the object tools |
TBoxGroup_Openings | The subtype tool item will be added to the window/door tools |
You can control the availability of the subtype tool in the toolbox by setting the enableFlags
bits:
API_TBoxEnabled | The subtype tool is enabled |
---|---|
API_TBoxEnabled_FloorPlan | on floor plan window |
API_TBoxEnabled_ModelSection | on model type section and elevation windows |
API_TBoxEnabled_DrawingSection | on drawing type section and elevation windows |
API_TBoxEnabled_3D | on 3D model window |
API_TBoxEnabled_Detail | on detail window |
API_TBoxEnabled_Layout | on layout and master layout windows |
API_TBoxEnabled_Worksheet | on worksheet window |
API_TBoxEnabled_ModelInteriorElevation | on model type interior elevation windows |
API_TBoxEnabled_DrawingInteriorElevation | on drawing type interior elevation windows |
If you want to register your subtype tool without appearing in the toolbox, pass 0 for both the smallIconResID
and the largeIconResID
parameters. If you register a subtype tool you should define the factory default values for this element type in an 'ACP0' resource. The element default will be initialized with these parameters when no preferences data is stored. The structure of this resource is shown at the example below. The resource ID should be passed in the defaultsResID parameter. Learn more about this topic at the general description of Library Part Subtypes.
GSErrCode ACAPI_MenuItem_InstallMenuHandler | ( | short | menuStrResID, |
APIMenuCommandProc * | handlerProc | ||
) |
Installs a callback procedure for handling the add-on's menu commands.
menuStrResID | [in] An identifier of the menu to install the callback procedure for. This should be the same what you used in the ACAPI_MenuItem_RegisterMenu as a menu string resource number in the RegisterInterface function. |
handlerProc | [in] The callback function to handle the menu commands. |
GSErrCode ACAPI_MenuItem_RegisterMenu | ( | short | menuStrResID, |
short | promptStrResID, | ||
APIMenuCodeID | menuPosCode, | ||
GSFlags | menuFlags | ||
) |
Registers the menu items of the add-on.
menuStrResID | [in] The resource ID of the menu resource, which should be in the resource fork of the add-on. |
promptStrResID | [in] The resource ID of the propmt string resource, which should be in the resource fork of the add-on. These strings appear in the status bar. |
menuPosCode | [in] Defines the server application's menu to insert the command into. |
menuFlags | [in] Flags describing whether you would like to see any separator item in the menu before or after the registered menu item. Its possible values are: MenuFlag_Default, MenuFlag_SeparatorBefore, and MenuFlag_SeparatorAfter |
GSErrCode ACAPI_Property_InstallPropertyObjectHandler | ( | short | strResID, |
APIPropertyObjectCommandProc * | propertyCommandProc | ||
) |
Installs the property handler function for the given menu item.
strResID | [in] The string resource ID you install the property handler for. |
propertyCommandProc | [in] The property command handler function. |
GSErrCode ACAPI_Property_InstallPropertyVisibilityHandler | ( | APIPropertyVisibilityHandlerProc * | handlerProc | ) |
Installs the property visibility handler function.
handlerProc | [in] The property visibility handler function. |
GSErrCode ACAPI_Property_RegisterPropertyObjectHandler | ( | short | assignStrResID | ) |
Registers a property handler.
assignStrResID | [in] The string resource ID, which will be used in Archicad's dialogs. |
GSErrCode ACAPI_Property_RegisterPropertyVisibilityHandler | ( | void | ) |
Tells Archicad that your add-on wants to modify property visibility.
GSErrCode ACAPI_RegisterModelessWindow | ( | Int32 | referenceID, |
APIPaletteControlCallBackProc * | callBackProc, | ||
GSFlags | controlFlags, | ||
const API_Guid & | paletteGuid = APINULLGuid |
||
) |
Registers a modeless palette in the API.
referenceID | [in] Arbitrary number to uniquely identify your modeless palette. (You can use the resource ID if you wish.) |
callBackProc | [in] Callback procedure for handling special API messages. It is called by the API, independently of DG. |
controlFlags | [in] Define the behavior of the palette above different Archicad windows (plan, 3D, section, layout), and in case of selection. |
paletteGuid | [in] A unique identifier for recording the state of the palette in the Work Environment. Optional parameter, can be omitted. |
API_PalEnabled_Worksheet
, API_PalEnabled_Elevation
, and API_PalEnabled_InteriorElevation
.