|
Archicad 30 C++ API
|
This outline summarizes the major new features and changes in the API available with Archicad 30.
API_DimElem structure, and can be set through the following variables:witnessOverrideExtension: enable the use of overridden attributeswitnessExtensionLinePen: the pen of the witness extension linewitnessExtensionLineType: the line type of the witness extension lineAPI_DimensionType structure, in the defWitnessOverrideExtension, defWitnessExtensionLinePen, and defWitnessExtensionLineType variables.API_DimElem structure:witnessExtensionGap: enable the use of gapwitnessExtensionGapSize: the size of the gap between the witness line and the extension lineAPI_DimensionType structure, in the defWitnessExtensionGap and defWitnessExtensionGapSize variables.ACAPI_View_GetCurrentImage (NewDisplay::NativeImage&, const API_ImageSource&) can retrieve image data from the current 3D or rendering view.API_ImageSource enum has been introduced with image source options for 3D window and rendering window.ACAPI.hpp umbrella header now includes the MEP electrical API headers for electrical circuits, devices, device defaults, panels, panel defaults, and project settings.API_DimensionType structure now has two new boolean variables: clipDimensionLine and clipWitnessLine, which replace the old clipOtherSide variable, and allow for separate line ending settings for the dimension line and witness lines.API_AddOnInfo structure now has a new version member, which can be used for displaying add-on version string on the info panel of the Add-On Manager dialog.API_PropertyMeasureType enum now has been extended with additional types, such as attribute index references, for better distinction of built-in properties.API_TextFrameShapeTypeID enum now has additional shape options: API_TextFrameShapeType_Diamond, API_TextFrameShapeType_Pointed_Rectangle90, API_TextFrameShapeType_Pointed_Rectangle120, API_TextFrameShapeType_Hexagon, and API_TextFrameShapeType_Hexagon_Rotated.API_CollisionElemResult member has been renamed from hasClearenceCollision to hasClearanceCollision.API_AttributeCreationInfo structure holds creation metadata for an attribute: methodID (API_AttrCreationMethod enum), methodDescription, source, creatorUserName, and creation timestamp.API_AttrCreationMethod enum identifies how an attribute was created (e.g. APIAttrCreationMethod_AddOn, APIAttrCreationMethod_Merge, APIAttrCreationMethod_Import, etc.).API_TWAccessRights enum has a new APICreationInfoClear value, which identifies the Teamwork permission to clear attribute creation information.API_MenuItemDisabledByHostApplication flag (0x00000004) distinguishes menu items disabled by the host application from those disabled by an add-on.API_SurfaceTypeID enum value APISurfaceType_ColumnFisrt has been renamed to APISurfaceType_ColumnFirst to correct a typo.PublishFormatMethods structure have changed:SaveProc has been replaced by SaveWithOptionProc, and the saveProc member has been replaced by saveWithOptionProc.SaveWithTranslatorProc, SaveTranslatorProc, and SaveInitialOptionProc support translator-based saving, translator selection, and initial save options.saveWithTranslatorProc, saveTranslatorProc, and saveInitialOptionProc store these callbacks.ACAPI::MEP::PortBase changes:GetElemId: returns the Unique identifier of the PortBase object.ACAPI::MEP::ElementBase changes:GetPorts: queries MEP Elements' ports without having to get the ID first.ACAPI::MEP::ElementDefault changes:GetVentilationPortDefaults: collects every ventilation port default for a given element default.GetPipingPortDefaults: collects every piping port default for a given element default.GetCableCarrierPortDefaults: collects every cable carrier port default for a given element default.GetPortDefaults: collects every port default for a given element default, useful when you don't care about the domains of the ports.ACAPI_Element_GetPropertyObjects parameter changes: now using references and std::vector& instead of pointers and C arrays, the Int32* was removed, the new signature is const API_Elem_Head& , std::vector<API_PropertyObjectRefType>&.ACAPI_ElementLink_GetLinkedPropertyObjects parameter changes: now using references and std::vector& instead of pointers and C arrays, the new signature is const API_Elem_Head&, bool&, Int32&, std::vector<Int32>& (the last Int32* was removed).ACAPI_ElementLink_GetLinkedPropertyObjects and ACAPI_ElementLink_SetLinkedPropertyObjects functions: the parameter inviduallyLibInd (typo) has been renamed to individuallyLibInd in both the pointer-based overload and the new reference-based overload.ACAPI_LibraryManagement_UsableGDLString function: the str parameter type has been changed from const char* to const GS::UniString&.ACAPI_GeoLocation_CalcSunOnPlace function: the placeInfo parameter type has been changed from API_PlaceInfo* to API_PlaceInfo&.ACAPI_Element_GetElemTypeName returns the name of element type variation in case of subtype tools, rather than the parent element type.API_IView3DSettingsEventHandler has been introduced for being able to get notified on 3D view settings changes:View3DSettingsChanged is called when 3D projection, filter and cut, or window settings change.View3DSettingsChangedInNavigation is called during 3D navigation to track camera setting changes.API_IACEventNotifier has a new pure virtual function, NotifyView3DSettingsEvent, for dispatching these notifications. Implementations of this interface must implement the new function.ACAPI_Attribute_GetCreationInfo function: new function that retrieves creation metadata (API_AttributeCreationInfo) for an attribute identified by API_AttrTypeID and API_AttributeIndex, returned via std::optional<API_AttributeCreationInfo>&.ACAPI_Attribute_Create and ACAPI_Attribute_CreateExt functions: two new optional parameters have been added: API_AttrCreationMethod creationMethod (defaults to APIAttrCreationMethod_AddOn) and const GS::UniString& source (defaults to empty), allowing callers to specify how and from where the attribute originates.ACAPI_AutoText_CreateAnAutoText function: the second parameter has been renamed from uiKey to name.ACAPI_AddOnIntegration_InstallPublisherSaveMethod has been replaced by separate save registration functions.ACAPI_AddOnIntegration_InstallPublisherSaveWithOptionMethod function can register save callback with options.ACAPI_AddOnIntegration_InstallPublisherSaveWithTranslatorMethod function can register save callback with selected translator.ACAPI_AddOnIntegration_InstallPublisherSaveTranslator function can register translator dialog callback.ACAPI_AddOnIntegration_InstallPublisherSaveInitialOption function can register initial options callback.DefaultTranslatorGetterProc callback parameter has been renamed from def to translator, without changing its type.ACAPI_GraphicalOverride_GetActualOverrideCombination: retrieves the override combination currently applied to the active window.ACAPI_GraphicalOverride_SetActualOverrideCombination: applies an override combination to the active window.ACAPI_ProjectInfo_GetGroups: retrieves the GUIDs of all ProjectInfo groups in order.ACAPI_ProjectInfo_GetGroupName: retrieves the name of a ProjectInfo group by its GUID.ACAPI_ProjectInfo_CreateGroup: creates a new ProjectInfo group with the given name. Returns APIERR_NAMEALREADYUSED if the name is taken, APIERR_NOACCESSRIGHT if the user lacks Teamwork permission.ACAPI_ProjectInfo_RenameGroup: renames an existing ProjectInfo group. Returns APIERR_NAMEALREADYUSED if the new name is taken.ACAPI_ProjectInfo_DeleteGroup: deletes a ProjectInfo group. Returns APIERR_REFUSEDPAR if the group contains fixed fields.ACAPI_ProjectInfo_MoveGroup: moves a group to a new position. Pass std::nullopt for beforeGroupGuid to move to the end.ACAPI_ProjectInfo_GetFields: retrieves the GUIDs of all fields in a group, including subfields.ACAPI_ProjectInfo_GetField: retrieves the name and value of a field.ACAPI_ProjectInfo_CreateField: creates a new custom field in a group. Returns APIERR_NAMEALREADYUSED if the name is taken.ACAPI_ProjectInfo_RenameField: renames a custom field. Returns APIERR_REFUSEDPAR for fixed (built-in) fields.ACAPI_ProjectInfo_SetFieldValue: sets the value of a field. Returns APIERR_REFUSEDPAR if the field has subfields (its value is calculated automatically).ACAPI_ProjectInfo_DeleteField: deletes a custom field. Returns APIERR_REFUSEDPAR for fixed (built-in) fields.ACAPI_ProjectInfo_MoveField: moves a field to a new position, possibly in a different group. Returns APIERR_REFUSEDPAR for subfields. Pass std::nullopt for beforeFieldGuid to move to the end.These functions and structures are currently available, but they are intended to be removed in the future. They will not receive bug fixes and support.
ACAPI_GeoLocation_CalcSunOnPlace (API_PlaceInfo*) is deprecated, use ACAPI_GeoLocation_CalcSunOnPlace (API_PlaceInfo&).ACAPI_Element_GetPropertyObjects and ACAPI_ElementLink_GetLinkedPropertyObjects are deprecated, use the new reference + std::vector overloads.ACAPI_AutoText_CreateAnAutoText is deprecated, use ACAPI_ProjectInfo_CreateField instead.ACAPI_AutoText_DeleteAnAutoText is deprecated, use ACAPI_ProjectInfo_DeleteField instead.ACAPI_AutoText_SetAnAutoText is deprecated, use ACAPI_ProjectInfo_SetFieldValue instead. The new function identifies Project Info fields by their GUID rather than the legacy dbKey string. Field GUIDs can be queried via ACAPI_ProjectInfo_GetFields, and their current name and value can be retrieved using ACAPI_ProjectInfo_GetField. Starting from the next version, fields will no longer be accessible using the old dbKey-based identification.ACAPI_AddOnIntegration_InstallPublisherSaveMethod has been removed.SaveProc and PublishFormatMethods::saveProc have been removed. Use SaveWithOptionProc and PublishFormatMethods::saveWithOptionProc instead.API_ElemPartId::operator!= overload has been removed. The operator== overload remains available.APIAny_UsableGDLStringID and APIAny_CalcSunOnPlaceID have been removed. Use ACAPI_LibraryManagement_UsableGDLString and ACAPI_GeoLocation_CalcSunOnPlace directly instead.