Archicad 29 C++ API
Loading...
Searching...
No Matches
IFC Data Access

Functions related to the IFC model data in Archicad. They provide a way to access imported IFC data of the model, or manipulate the IFC export process runtime. More...

Classes

class  IFCAPI::Assignments
 Represents the persistent Assignment Tree in IFC. More...
 
class  IFCAPI::Attribute
 Represents an IFC Attribute. More...
 
class  IFCAPI::Classification
 Represents an IfcClassification. More...
 
class  IFCAPI::ClassificationReference
 Represents an IfcClassificationReference. More...
 
class  IFCAPI::HookAssignments
 Class to set up an assignment structure for the assignments export hook. More...
 
class  IFCAPI::HookManager
 To register an add-on for IFC hook callbacks, where one can provide their own data to the IFC export. More...
 
class  IFCAPI::ObjectAccessor
 To handle IFC objects, identifications and types. More...
 
class  IFCAPI::ObjectID
 Identifies an IFC entity (e.g: IfcBuildingStorey, IfcBeam, IfcZone, etc.) More...
 
class  IFCAPI::PropertySingleValue
 Represents an IfcPropertySingleValue. More...
 
class  IFCAPI::PropertyListValue
 Represents an IfcPropertyListValue. More...
 
class  IFCAPI::PropertyBoundedValue
 Represents an IfcPropertyBoundedValue. More...
 
class  IFCAPI::PropertyEnumeratedValue
 Represents an IfcPropertyEnumeratedValue. More...
 
class  IFCAPI::PropertyTableValue
 Represents an IfcPropertyTableValue. More...
 
class  IFCAPI::Property
 Represents an IfcProperty. More...
 
class  IFCAPI::PropertyAccessor
 To access IFC attributes, properties and classification references. More...
 
class  IFCAPI::PropertyBuilder
 To create IFC attribute, property or classification reference. More...
 
class  IFCAPI::Value
 Represent an IFC value. More...
 
struct  API_IFCRelationshipData
 Contains IFC Entity relations which are specific for the IFC. The IFC Entities are represented by their GlobalId. More...
 

Typedefs

using IFCAPI::IfcGloballyUniqueId = GS::UniString
 Type definition for IfcGloballyUniqueId.
 
using IFCAPI::IFCType = GS::UniString
 Type definition for IFC type.
 
using IFCAPI::AnyValue = std::optional<std::variant<bool, IfcLogical, Int64, double, GS::UniString>>
 Type definition to represent a value.
 
using IFCAPI::HookManager::PropertyHookFunction = std::function<void (const IFCAPI::ObjectID&, std::vector<IFCAPI::Property>&)>
 Function definition to add generated IFC properties to IFC objects.
 
using IFCAPI::HookManager::AttributeHookFunction = std::function<void (const IFCAPI::ObjectID&, std::vector<IFCAPI::Attribute>&)>
 Function definition to fill IFC attributes with generated values in IFC objects.
 
using IFCAPI::HookManager::ClassificationReferenceHookFunction = std::function<void (const IFCAPI::ObjectID&, std::vector<IFCAPI::ClassificationReference>&)>
 Function definition to add generated IFC classification references to IFC objects.
 
using IFCAPI::HookManager::AssignmentsHookFunction = std::function<void (IFCAPI::HookAssignments&)>
 Function definition to set up a generated IFC assignment structure for IFC export.
 
using IFCAPI::PropertyByType = std::variant<PropertySingleValue, PropertyListValue, PropertyBoundedValue, PropertyEnumeratedValue, PropertyTableValue>
 Type definition to describe any IfcProperty.
 
typedef GSErrCode APIIFCRelationshipDataProc(GS::HashTable< GS::UniString, API_IFCRelationshipData > *ifcRelationshipDataTable, const void *par1)
 User supplied callback procedure for helping BCF Import.
 

Enumerations

enum class  IFCAPI::IfcLogical { IfcLogical::True , IfcLogical::Unknown , IfcLogical::False }
 Type definition for IfcLogical value. More...
 

Functions

std::unordered_set< IFCAPI::ObjectIDIFCAPI::Assignments::GetRootGroups () const
 Returns all root IFC groups.
 
std::unordered_map< IFCAPI::ObjectID, std::unordered_set< IFCAPI::ObjectID > > IFCAPI::Assignments::GetChildObjectTable () const
 Returns a table representing the nested child hierarchy.
 
std::unordered_map< IFCAPI::ObjectID, std::unordered_set< IFCAPI::ObjectID > > IFCAPI::Assignments::GetParentObjectTable () const
 Returns a table representing the parent hierarchy.
 
GS::UniString IFCAPI::Attribute::GetName () const
 Name of the Attribute.
 
std::optional< GS::UniString > IFCAPI::Attribute::GetValue () const
 Value of the Attribute.
 
IFCAPI::IFCType IFCAPI::Attribute::GetValueType () const
 Value type of the Attribute.
 
GS::UniString IFCAPI::Classification::GetName () const
 Name of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::Classification::GetSource () const
 Source of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::Classification::GetEdition () const
 Edition of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::Classification::GetEditionDate () const
 EditionDate of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::Classification::GetDescription () const
 Description of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::Classification::GetLocation () const
 Location of the IfcClassification.
 
std::optional< GS::UniString > IFCAPI::ClassificationReference::GetLocation () const
 Location of the IfcClassificationReference.
 
std::optional< GS::UniString > IFCAPI::ClassificationReference::GetName () const
 Name of the IfcClassificationReference.
 
std::optional< GS::UniString > IFCAPI::ClassificationReference::GetIdentification () const
 Identification of the IfcClassificationReference.
 
std::optional< GS::UniString > IFCAPI::ClassificationReference::GetDescription () const
 Description of the IfcClassificationReference.
 
std::optional< GS::UniString > IFCAPI::ClassificationReference::GetSort () const
 Sort of the IfcClassificationReference.
 
IFCAPI::Classification IFCAPI::ClassificationReference::GetReferencedSource () const
 ReferencedSource of the IfcClassificationReference.
 
GS::UniString IFCAPI::ClassificationReference::GetIfcRelAssociatesClassificationName () const
 Name of the IfcRelAssociatesClassification.
 
ACAPI::Result< IFCAPI::ObjectIDIFCAPI::HookAssignments::CreateIfcGroup (const API_Guid &guid, const IFCType &ifcType, const std::optional< GS::UniString > &name, bool addAsRoot)
 Add an IFC Group definition to the assignment hook structure.
 
ACAPI::Result< IFCAPI::ObjectIDIFCAPI::HookAssignments::GetIfcRelAssignsToGroup (const IFCAPI::ObjectID groupObjectID) const
 Get the IFC RelAssignsToGroup object of the passed group object.
 
ACAPI::Result< IFCAPI::ObjectIDIFCAPI::HookAssignments::GetIfcRelServicesBuildings (const IFCAPI::ObjectID systemObjectID) const
 Get the IFC RelServicesBuildings object of the passed system object.
 
ACAPI::Result< void > IFCAPI::HookAssignments::AssignObjects (const IFCAPI::ObjectID groupID, const std::vector< IFCAPI::ObjectID > &assignedObjectIDs)
 Assign objects to the passed group object.
 
ACAPI::Result< void > IFCAPI::HookAssignments::ServiceBuildings (const IFCAPI::ObjectID systemID, const std::vector< IFCAPI::ObjectID > &servicedObjectIDs)
 Set serviced spatial element objects to the passed system object.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterPropertyHook (const IFCAPI::HookManager::PropertyHookFunction &callback)
 Register for the IFC property export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterPropertyHook ()
 Unregister from the IFC property export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterAttributeHook (const IFCAPI::HookManager::AttributeHookFunction &callback)
 Register for the IFC attribute export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterAttributeHook ()
 Unregister from the IFC attribute export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterClassificationReferenceHook (const IFCAPI::HookManager::ClassificationReferenceHookFunction &callback)
 Register for the IFC classification reference export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterClassificationReferenceHook ()
 Unregister from the IFC classification reference export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectPropertyHook (const IFCAPI::HookManager::PropertyHookFunction &callback)
 Register for the IFC type objects' property export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectPropertyHook ()
 Unregister from the IFC type objects' property export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectAttributeHook (const IFCAPI::HookManager::AttributeHookFunction &callback)
 Register for the IFC type objects' attribute export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectAttributeHook ()
 Unregister from the IFC type objects' attribute export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectClassificationReferenceHook (const IFCAPI::HookManager::ClassificationReferenceHookFunction &callback)
 Register for the IFC type objects' classification reference export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectClassificationReferenceHook ()
 Unregister from the IFC type objects' classification reference export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::RegisterAssignmentsHook (const IFCAPI::HookManager::AssignmentsHookFunction &callback)
 Register for the IFC assignments export hook.
 
ACAPI::Result< void > IFCAPI::HookManager::UnregisterAssignmentsHook ()
 Unregister from the IFC assignments export hook.
 
HookManager IFCAPI::GetHookManager ()
 Get HookManager to register an add-on for IFC hook callbacks.
 
ACAPI::Result< ObjectIDIFCAPI::ObjectAccessor::CreateIfcProjectObjectID () const
 Create ObjectID for IfcProject.
 
ACAPI::Result< ObjectIDIFCAPI::ObjectAccessor::CreateIfcSiteObjectID () const
 Create ObjectID for IfcSite.
 
ACAPI::Result< ObjectIDIFCAPI::ObjectAccessor::CreateIfcBuildingObjectID () const
 Create ObjectID for IfcBuilding.
 
ACAPI::Result< ObjectIDIFCAPI::ObjectAccessor::CreateIfcBuildingStoreyObjectID (short floorNumber) const
 Create ObjectID based on Archicad story.
 
ACAPI::Result< ObjectIDIFCAPI::ObjectAccessor::CreateElementObjectID (const API_Elem_Head &elementHead) const
 Create ObjectID based on Archicad element.
 
ACAPI::Result< IfcGloballyUniqueIdIFCAPI::ObjectAccessor::GetGlobalId (const IFCAPI::ObjectID &objectID) const
 Get IFC Identifier for an IFC entity.
 
ACAPI::Result< IfcGloballyUniqueIdIFCAPI::ObjectAccessor::GetExternalGlobalId (const IFCAPI::ObjectID &objectID) const
 Get external IFC Identifier for an IFC entity.
 
ACAPI::Result< std::unordered_set< IFCAPI::ObjectID > > IFCAPI::ObjectAccessor::FindElementsByGlobalId (const IfcGloballyUniqueId &globalId) const
 Find elements having a certain IFC identifier.
 
ACAPI::Result< API_GuidIFCAPI::ObjectAccessor::GetAPIElementID (const IFCAPI::ObjectID &objectID) const
 Get Archicad element guid from an IFC ObjectID.
 
ACAPI::Result< short > IFCAPI::ObjectAccessor::GetStoryIndex (const IFCAPI::ObjectID &objectID) const
 Get Archicad story index from an IFC ObjectID.
 
ACAPI::Result< IFCTypeIFCAPI::ObjectAccessor::GetIFCType (const IFCAPI::ObjectID &objectID) const
 Get IFC type of an IFC entity.
 
ACAPI::Result< IFCTypeIFCAPI::ObjectAccessor::GetTypeObjectIFCType (const IFCAPI::ObjectID &objectID) const
 Get IFC type of the IfcTypeObject of an IFC entity.
 
ACAPI::Result< IFCAPI::AssignmentsIFCAPI::ObjectAccessor::GetAssignments () const
 Get the persistent Assignment Tree.
 
ObjectAccessor IFCAPI::GetObjectAccessor ()
 Get the ObjectAccessor for handle IFC objects, identifications and types.
 
ULong IFCAPI::ObjectID::GenerateHashValue () const
 For use as Hash key.
 
bool IFCAPI::ObjectID::operator== (const IFCAPI::ObjectID &other) const
 Equality operator.
 
bool IFCAPI::ObjectID::operator!= (const IFCAPI::ObjectID &other) const
 Inequality operator.
 
IFCAPI::Value IFCAPI::PropertySingleValue::GetNominalValue () const
 Get the property value.
 
std::vector< IFCAPI::ValueIFCAPI::PropertyListValue::GetListValues () const
 Get list of property value.
 
IFCAPI::Value IFCAPI::PropertyBoundedValue::GetUpperBoundValue () const
 Get the upper bound of the property bounded value.
 
IFCAPI::Value IFCAPI::PropertyBoundedValue::GetLowerBoundValue () const
 Get the lower bound of the property bounded value.
 
IFCAPI::Value IFCAPI::PropertyBoundedValue::GetSetPointValue () const
 Get the set point of the property bounded value.
 
std::vector< IFCAPI::ValueIFCAPI::PropertyEnumeratedValue::GetEnumerationValues () const
 Get list of property values of the enumeration.
 
std::vector< IFCAPI::ValueIFCAPI::PropertyEnumeratedValue::GetEnumerationReference () const
 Get list of property values of the enumeration reference.
 
std::vector< IFCAPI::ValueIFCAPI::PropertyTableValue::GetDefiningValues () const
 Get list of defining property values.
 
std::vector< IFCAPI::ValueIFCAPI::PropertyTableValue::GetDefinedValues () const
 Get list of defined property values.
 
GS::UniString IFCAPI::Property::GetPropertySetName () const
 Name of the container IfcPropertySet.
 
GS::UniString IFCAPI::Property::GetName () const
 Name of the IfcProperty.
 
PropertyByType IFCAPI::Property::GetTyped () const
 Instance of the specific property type.
 
 IFCAPI::PropertyAccessor::PropertyAccessor (const IFCAPI::ObjectID &objectID)
 Get PropertyAccessor to access IFC attributes, properties and classification references.
 
ACAPI::Result< std::vector< Attribute > > IFCAPI::PropertyAccessor::GetAttributes () const
 Get the entity's IFC attributes.
 
ACAPI::Result< std::vector< Property > > IFCAPI::PropertyAccessor::GetPreviewProperties () const
 Get the entity's preview IFC properties.
 
ACAPI::Result< std::vector< Property > > IFCAPI::PropertyAccessor::GetLocalProperties () const
 Get the entity's local IFC properties.
 
ACAPI::Result< std::vector< ClassificationReference > > IFCAPI::PropertyAccessor::GetPreviewClassificationReferences () const
 Get the entity's preview IFC classification references.
 
ACAPI::Result< std::vector< ClassificationReference > > IFCAPI::PropertyAccessor::GetLocalClassificationReferences () const
 Get the entity's IFC classification references.
 
ACAPI::Result< ValueIFCAPI::PropertyBuilder::CreateValue (const IFCAPI::IFCType &valueType, const IFCAPI::AnyValue &anyValue) const
 Create an IFC value.
 
ACAPI::Result< ValueIFCAPI::PropertyBuilder::CreateDefaultValue (const IFCAPI::IFCType &valueType) const
 Create a default IFC value based on the IFC type.
 
Value IFCAPI::PropertyBuilder::CreateEmptyValue () const
 Create an empty IFC value.
 
ACAPI::Result< IFCAPI::AttributeIFCAPI::PropertyBuilder::CreateAttribute (const GS::UniString &name, const std::optional< GS::UniString > &value) const
 Create an IFC attribute from scratch.
 
ACAPI::Result< IFCAPI::PropertyIFCAPI::PropertyBuilder::CreatePropertySingleValue (const GS::UniString &propertySetName, const GS::UniString &name, const IFCAPI::Value &value) const
 Create an IFC property single value.
 
ACAPI::Result< IFCAPI::PropertyIFCAPI::PropertyBuilder::CreatePropertyTableValue (const GS::UniString &propertySetName, const GS::UniString &name, const std::vector< IFCAPI::Value > &definingValues, const std::vector< IFCAPI::Value > &definedValues) const
 Create an IFC property table value.
 
ACAPI::Result< IFCAPI::PropertyIFCAPI::PropertyBuilder::CreatePropertyListValue (const GS::UniString &propertySetName, const GS::UniString &name, const std::vector< IFCAPI::Value > &listValues) const
 Create an IFC property list value.
 
ACAPI::Result< IFCAPI::PropertyIFCAPI::PropertyBuilder::CreatePropertyBoundedValue (const GS::UniString &propertySetName, const GS::UniString &name, const IFCAPI::Value &lowerBoundValue, const IFCAPI::Value &upperBoundValue, const IFCAPI::Value &setPointValue) const
 Create an IFC property bounded value.
 
ACAPI::Result< IFCAPI::PropertyIFCAPI::PropertyBuilder::CreatePropertyEnumeratedValue (const GS::UniString &propertySetName, const GS::UniString &name, const std::vector< IFCAPI::Value > &enumerationReference, const std::vector< IFCAPI::Value > &enumeratedValues) const
 Create an IFC property enumerated value.
 
ACAPI::Result< IFCAPI::ClassificationIFCAPI::PropertyBuilder::CreateClassification (const GS::UniString &name, const std::optional< GS::UniString > &source, const std::optional< GS::UniString > &edition, const std::optional< GS::UniString > &editionDate, const std::optional< GS::UniString > &description, const std::optional< GS::UniString > &location) const
 Create an IFC classification from scratch.
 
ACAPI::Result< ClassificationReferenceIFCAPI::PropertyBuilder::CreateClassificationReference (const std::optional< GS::UniString > &location, const std::optional< GS::UniString > &identification, const std::optional< GS::UniString > &name, const std::optional< GS::UniString > &description, const std::optional< GS::UniString > &sort, const IFCAPI::Classification &referencedSource, const GS::UniString &relAssociatesClassificationName) const
 Create an IFC classification reference from scratch.
 
PropertyBuilder IFCAPI::GetPropertyBuilder ()
 Get PropertyBuilder to create IFC attribute, property or classification reference.
 
IFCAPI::IFCType IFCAPI::Value::GetType () const
 The type of the Value (For example: IfcLabel, IfcPositiveLengthMeasure, ...)
 
IFCAPI::AnyValue IFCAPI::Value::GetAnyValue () const
 The value.
 
GSErrCode ACAPI_IFC_GetIFCRelationshipData (const API_IFCTranslatorIdentifier &ifcTranslatorIdentifier, API_IFCRelationshipData &ifcRelationshipData)
 It generates an IFC Relationship Data based on the input IFC Translator parameter.
 
GSErrCode ACAPI_IFC_GetIFCExportTranslatorsList (GS::Array< API_IFCTranslatorIdentifier > &ifcExportTranslators)
 Returns the valid IFC Export Translators.
 
GSErrCode ACAPI_IFC_InvokeIFCExportSettingsDlg (API_Guid &viewGuid, API_IFCTranslatorIdentifier &ifcTranslatorIdentifier)
 It opens a dialog where a View and an IFC Export Translator can be selected.
 

Detailed Description

Functions related to the IFC model data in Archicad. They provide a way to access imported IFC data of the model, or manipulate the IFC export process runtime.

IFC Overview

IFC is one of the many interoperability formats supported by Archicad. Some of the data it operates with however are stored in a custom manner, also for IFC export the built-in translator options may not always suffice for specific purposes. So API access is provided here.

Generally we support querying persistent IFC data, which were created during import, or manually on an IFC user interface. Further creation and changing of them however is something we don't support anymore.

To influcence the IFC export - with extra IFC properties for example - we recommend setting Archicad data, and using IFC mappings. If it's functionality is not enough in any way, you can use IFC hooks on the API. You can register "hook" callback functions, which are called every time the relevant IFC properties of an element are queried. There you can add your own data dynamically, without the need to set persistent IFC data in Archicad.

Use the IFCAPI namespace to access the maintained version of the supported functionality. All functionality generally depends on the presence of a working IFC In-Out add-on, otherwise APIERR_MODULNOTINSTALLED error will occur.

Supported functionality:

Typedef Documentation

◆ AnyValue

using IFCAPI::AnyValue = std::optional<std::variant<bool, IfcLogical, Int64, double, GS::UniString>>

Type definition to represent a value.

Since
Archicad 28

◆ APIIFCRelationshipDataProc

typedef GSErrCode APIIFCRelationshipDataProc(GS::HashTable< GS::UniString, API_IFCRelationshipData > *ifcRelationshipDataTable, const void *par1)

User supplied callback procedure for helping BCF Import.

Since
Archicad 26
Parameters
ifcRelationshipDataTable[out] Gives back a Hashtable where the keys are the IFCProject's GlobalIds and the values are their API_IFCRelationshipData.
par1[in] Optional parameter.
Returns
  • NoError - The function has completed with success.
  • APIERR_GENERAL - Any user-defined error can be returned.
Remarks
API_IFCRelationshipData may be needed by BCF topics when they refer to such components which are represented by their parent elements in Archicad. A typical example is when an Archicad Wall is exported in IFC as an IFCWall instance having several IFCBuildingElementPart components and the imported BCF topic refers to a certain IFCBuildingElementPart. In this case the BCF importer should convert the IFCBuildingElementPart reference to its parent (IFCWall) and connect its corresponding Archicad Wall element to the created MarkUp Entry. In code it looks like the following: API_IFCRelationshipData ifcRelationshipData; ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid1, ifcWallGuid); ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid2, ifcWallGuid); ifcRelationshipData.containmentTable.Add (ifcBuildingElementPartGuid3, ifcWallGuid); ifcRelationshipDataTable->Add (ifcProjectGuid, ifcRelationshipData); If the origin of the model is the current Archicad project, then we can get the API_IFCRelationshipData which can be generated with ACAPI_IFC_GetIFCRelationshipData. The ifcRelationshipDataTable can have several API_IFCRelationshipData of several IFCProjects. This is because the components of a BCF topic can refer several components which may be located under different IFCProjects. For use see ACAPI_Markup_ImportFromBCF.

◆ AssignmentsHookFunction

Function definition to set up a generated IFC assignment structure for IFC export.

Since
Archicad 28

◆ AttributeHookFunction

using IFCAPI::HookManager::AttributeHookFunction = std::function<void (const IFCAPI::ObjectID&, std::vector<IFCAPI::Attribute>&)>

Function definition to fill IFC attributes with generated values in IFC objects.

Since
Archicad 28

◆ ClassificationReferenceHookFunction

Function definition to add generated IFC classification references to IFC objects.

Since
Archicad 28

◆ IfcGloballyUniqueId

using IFCAPI::IfcGloballyUniqueId = GS::UniString

Type definition for IfcGloballyUniqueId.

Since
Archicad 28

Can be used to identify elements between Archicad and IFC.

◆ IFCType

using IFCAPI::IFCType = GS::UniString

Type definition for IFC type.

Since
Archicad 28

◆ PropertyByType

Type definition to describe any IfcProperty.

Since
Archicad 28

◆ PropertyHookFunction

using IFCAPI::HookManager::PropertyHookFunction = std::function<void (const IFCAPI::ObjectID&, std::vector<IFCAPI::Property>&)>

Function definition to add generated IFC properties to IFC objects.

Since
Archicad 28

Enumeration Type Documentation

◆ IfcLogical

enum class IFCAPI::IfcLogical
strong

Type definition for IfcLogical value.

Since
Archicad 28
Remarks
Represents the logical values used in the Industry Foundation Classes (IFC) data model. This enum is used to denote the logical state of a value in IFC, which can be true, false, or unknown.
Enumerator
True 

Represents a true logical value.

Unknown 

Represents an unknown logical value.

False 

Represents a false logical value.

Function Documentation

◆ ACAPI_IFC_GetIFCExportTranslatorsList()

GSErrCode ACAPI_IFC_GetIFCExportTranslatorsList ( GS::Array< API_IFCTranslatorIdentifier > & ifcExportTranslators)

Returns the valid IFC Export Translators.

Since
Archicad 26
Parameters
ifcExportTranslators[out] The resulting IFC Export Translators.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - If any error occured during the conversion.
Remarks
Returns the valid IFC Export Translators. The first item of the ifcExportTranslators is the preview translator.

◆ ACAPI_IFC_GetIFCRelationshipData()

GSErrCode ACAPI_IFC_GetIFCRelationshipData ( const API_IFCTranslatorIdentifier & ifcTranslatorIdentifier,
API_IFCRelationshipData & ifcRelationshipData )

It generates an IFC Relationship Data based on the input IFC Translator parameter.

Since
Archicad 26
Parameters
ifcTranslatorIdentifier[in] Neccessery parameter for generate IFC Relationship Data.
ifcRelationshipData[out] The resulting IFC Relationship Data.
Returns
  • NoError - The function has completed with success.
  • APIERR_BADPARS - If any error occured during the Relationship Data generation.
Remarks
It generates an IFC Relationship Data based on the input parameters.

◆ ACAPI_IFC_InvokeIFCExportSettingsDlg()

GSErrCode ACAPI_IFC_InvokeIFCExportSettingsDlg ( API_Guid & viewGuid,
API_IFCTranslatorIdentifier & ifcTranslatorIdentifier )

It opens a dialog where a View and an IFC Export Translator can be selected.

Since
Archicad 26
Parameters
viewGuid[in/out] A view Guid. Returns the selected view guid.
ifcTranslatorIdentifier[in/out] An IFC Export Translator. Returns the selected IFC Export Translator identifier.
Returns
  • NoError - The function has completed with success.
  • Cancel - The user cancelled the export settings dialog.
Remarks
A dialog where the user can select a View and an IFC Export Translator.

◆ AssignObjects()

ACAPI::Result< void > IFCAPI::HookAssignments::AssignObjects ( const IFCAPI::ObjectID groupID,
const std::vector< IFCAPI::ObjectID > & assignedObjectIDs )

Assign objects to the passed group object.

Since
Archicad 28
Parameters
groupID[in] ObjectID of the group object.
assignedObjectIDs[in] List of objects to assign to the group.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Passed object is not a group subtype, or assignedObjectIDs contains an objectID, which can't be assigned.
Remarks
Not all invalid assignment cases are represented in the return value here, but no invalid result will be generated in the IFC export. Check the IFC schema on the web for further info about IfcRelAssignsToGroup
Example
auto groupResult = hookAssignments.CreateIfcGroup (guid, type, name, addAsRoot);
if (groupResult.IsOk ()) {
auto group = groupResult.Unwrap ();
myGroupingData.groupObjects.emplace (group);
hookAssignments.AssignObjects (group, GetElementObjects (toAssign));
if (toService.has_value ())
hookAssignments.ServiceBuildings (group, GetElementObjects (*toService));
if (name.has_value ()) {
auto relAssigns = hookAssignments.GetIfcRelAssignsToGroup (group);
if (relAssigns.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relAssigns, *name);
auto relServices = hookAssignments.GetIfcRelServicesBuildings (group);
if (relServices.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relServices, *name);
}
}

◆ CreateAttribute()

ACAPI::Result< IFCAPI::Attribute > IFCAPI::PropertyBuilder::CreateAttribute ( const GS::UniString & name,
const std::optional< GS::UniString > & value ) const

Create an IFC attribute from scratch.

Since
Archicad 28
Parameters
name[in] name of the IFC attribute as defined in the IFC schema, e.g. "Description".
value[in] value of the IFC attribute.
Returns
If able, an IFC attribute object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid name passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC attributes using IFC Hooks.

◆ CreateClassification()

ACAPI::Result< IFCAPI::Classification > IFCAPI::PropertyBuilder::CreateClassification ( const GS::UniString & name,
const std::optional< GS::UniString > & source,
const std::optional< GS::UniString > & edition,
const std::optional< GS::UniString > & editionDate,
const std::optional< GS::UniString > & description,
const std::optional< GS::UniString > & location ) const

Create an IFC classification from scratch.

Since
Archicad 28
Parameters
name[in] name of the IFC classification reference.
source[in] source of the IFC classification reference.
edition[in] edition of the IFC classification reference.
editionDate[in] editionDate of the IFC classification reference.
description[in] description of the IFC classification reference.
location[in] location of the IFC classification reference.
Returns
If able, an IFC classification object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to create an IFC classification reference to use with IFC Hooks

◆ CreateClassificationReference()

ACAPI::Result< ClassificationReference > IFCAPI::PropertyBuilder::CreateClassificationReference ( const std::optional< GS::UniString > & location,
const std::optional< GS::UniString > & identification,
const std::optional< GS::UniString > & name,
const std::optional< GS::UniString > & description,
const std::optional< GS::UniString > & sort,
const IFCAPI::Classification & referencedSource,
const GS::UniString & relAssociatesClassificationName ) const

Create an IFC classification reference from scratch.

Since
Archicad 28
Parameters
location[in] location of the IFC classification reference.
identification[in] identification of the IFC classification reference.
name[in] name of the IFC classification reference.
description[in] description of the IFC classification reference.
sort[in] sort of the IFC classification reference.
referencedSource[in] referencedSource of the IFC classification reference.
relAssociatesClassificationName[in] name of the IfcRelAssociatesClassification to export the IFC classification reference with. Must be unique for each classification reference used on the same object.
Returns
If able, an IFC classification reference object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid relAssociatesClassificationName or valueType passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC classification references using IFC Hooks

◆ CreateDefaultValue()

ACAPI::Result< Value > IFCAPI::PropertyBuilder::CreateDefaultValue ( const IFCAPI::IFCType & valueType) const

Create a default IFC value based on the IFC type.

Since
Archicad 29
Parameters
valueType[in] type of the value as defined in the IFC schema, e.g. "IfcBoolean".
Returns
If able, an IFC value object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to have a value with the given IFC type. It's contained anyValue will hold an alternative of the necessary storage type with a default value. So you can also know, which one to fill for a given IFC type.

◆ CreateElementObjectID()

ACAPI::Result< ObjectID > IFCAPI::ObjectAccessor::CreateElementObjectID ( const API_Elem_Head & elementHead) const

Create ObjectID based on Archicad element.

Since
Archicad 28
Parameters
elementHead[in] Archicad element.
Returns
If able, creates an ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid value passed in the elementHead parameter.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
It can be used to identify an IfcElement or IfcSpace.
Example
GS::Array<API_Guid> elementGuids;
for (const auto& elementGuid : elementGuids) {
API_Elem_Head head{};
head.guid = elementGuid;
AddObjectID (objectID);
}

◆ CreateEmptyValue()

Value IFCAPI::PropertyBuilder::CreateEmptyValue ( ) const

Create an empty IFC value.

Since
Archicad 28
Returns
an empty IFC value.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used when creating a bounded property value.

◆ CreateIfcBuildingObjectID()

ACAPI::Result< ObjectID > IFCAPI::ObjectAccessor::CreateIfcBuildingObjectID ( ) const

Create ObjectID for IfcBuilding.

Since
Archicad 28
Returns
If able, creates an ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
It can be used to identify the IfcBuilding.
Example
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcProjectObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcSiteObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcBuildingObjectID ());

◆ CreateIfcBuildingStoreyObjectID()

ACAPI::Result< ObjectID > IFCAPI::ObjectAccessor::CreateIfcBuildingStoreyObjectID ( short floorNumber) const

Create ObjectID based on Archicad story.

Since
Archicad 28
Parameters
floorNumber[in] Archicad story floor number.
Returns
If able, creates an ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid value passed in the floorNumber parameter.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
It can be used to identify an IfcBuildingStorey.
Example
API_StoryInfo storyInfo;
GS::ErrorStatus status = ACAPI_ProjectSetting_GetStorySettings (&storyInfo);
if (status.IsOK ()) {
for (short storyIndex = storyInfo.firstStory; storyIndex <= storyInfo.lastStory; ++storyIndex) {
if (objectID.IsOk ())
result.Add (objectID.Unwrap ());
}
}
BMKillHandle ((GSHandle*)&storyInfo.data);

◆ CreateIfcGroup()

ACAPI::Result< IFCAPI::ObjectID > IFCAPI::HookAssignments::CreateIfcGroup ( const API_Guid & guid,
const IFCType & ifcType,
const std::optional< GS::UniString > & name,
bool addAsRoot )

Add an IFC Group definition to the assignment hook structure.

Since
Archicad 28
Parameters
guid[in] A deterministic and unique id of the group to have a stable identification throughout the hook process, shall be fixed or content-based, not random.
ifcType[in] IFC type of the group, one of the group subtypes visible in IFC Project Manager. Can be: IfcGroup, IfcSystem, IfcBuildingSystem, IfcDistributionSystem or IfcZone
name[in] Name of the group, if omitted the default naming applies, or the one set up for the group in the attribute hook.
addAsRoot[in] Whether the group shall be one of the root groups, in the assignments structure, usually true. Ifc a group is only a subgroup of another, set to false.
Returns
An ObjectID identifier generated for the group. Keep it, to recognize the reference later (in a property hook call for example).
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid/existing guid passed, or passed ifcType is incorrect.
Remarks
When a group is created, the necessary relations are also added. You can ignore them, unless you want to manipulate their properties with the hook. If you do, use the Get functions here to find out which one is queried in the hook. Check the IFC schema on the web for further info about IfcGroup and it's subtypes.
Example
auto groupResult = hookAssignments.CreateIfcGroup (guid, type, name, addAsRoot);
if (groupResult.IsOk ()) {
auto group = groupResult.Unwrap ();
myGroupingData.groupObjects.emplace (group);
hookAssignments.AssignObjects (group, GetElementObjects (toAssign));
if (toService.has_value ())
hookAssignments.ServiceBuildings (group, GetElementObjects (*toService));
if (name.has_value ()) {
auto relAssigns = hookAssignments.GetIfcRelAssignsToGroup (group);
if (relAssigns.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relAssigns, *name);
auto relServices = hookAssignments.GetIfcRelServicesBuildings (group);
if (relServices.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relServices, *name);
}
}

◆ CreateIfcProjectObjectID()

ACAPI::Result< ObjectID > IFCAPI::ObjectAccessor::CreateIfcProjectObjectID ( ) const

Create ObjectID for IfcProject.

Since
Archicad 28
Returns
If able, creates an ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
It can be used to identify the IfcProject.
Example
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcProjectObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcSiteObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcBuildingObjectID ());

◆ CreateIfcSiteObjectID()

ACAPI::Result< ObjectID > IFCAPI::ObjectAccessor::CreateIfcSiteObjectID ( ) const

Create ObjectID for IfcSite.

Since
Archicad 28
Returns
If able, creates an ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
It can be used to identify the IfcSite.
Example
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcProjectObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcSiteObjectID ());
AddObjectID (IFCAPI::GetObjectAccessor ().CreateIfcBuildingObjectID ());

◆ CreatePropertyBoundedValue()

ACAPI::Result< IFCAPI::Property > IFCAPI::PropertyBuilder::CreatePropertyBoundedValue ( const GS::UniString & propertySetName,
const GS::UniString & name,
const IFCAPI::Value & lowerBoundValue,
const IFCAPI::Value & upperBoundValue,
const IFCAPI::Value & setPointValue ) const

Create an IFC property bounded value.

Since
Archicad 28
Parameters
propertySetName[in] name of the property set which contains the property.
name[in] name of the IFC property.
lowerBoundValue[in] lower bound value of the IFC property bounded value.
upperBoundValue[in] upper bound value of the IFC property bounded value.
setPointValue[in] set point value of the IFC property bounded value.
Returns
If able, an IFC property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
At least one of the three values must be set, the rest may be empty Result can be used to map data to Objects' IFC properties using IFC Hooks.

◆ CreatePropertyEnumeratedValue()

ACAPI::Result< IFCAPI::Property > IFCAPI::PropertyBuilder::CreatePropertyEnumeratedValue ( const GS::UniString & propertySetName,
const GS::UniString & name,
const std::vector< IFCAPI::Value > & enumerationReference,
const std::vector< IFCAPI::Value > & enumeratedValues ) const

Create an IFC property enumerated value.

Since
Archicad 28
Parameters
propertySetName[in] name of the property set which contains the property.
name[in] name of the IFC property.
enumerationReference[in] possible enumeration values of the IFC property enumerated value.
enumeratedValues[in] enumerated values of the IFC property enumerated value, shall be a subset of enumerationReference.
Returns
If able, an IFC property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC properties using IFC Hooks.

◆ CreatePropertyListValue()

ACAPI::Result< IFCAPI::Property > IFCAPI::PropertyBuilder::CreatePropertyListValue ( const GS::UniString & propertySetName,
const GS::UniString & name,
const std::vector< IFCAPI::Value > & listValues ) const

Create an IFC property list value.

Since
Archicad 28
Parameters
propertySetName[in] name of the property set which contains the property.
name[in] name of the IFC property.
listValues[in] list of values of the IFC property list value.
Returns
If able, an IFC property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC properties using IFC Hooks.

◆ CreatePropertySingleValue()

ACAPI::Result< IFCAPI::Property > IFCAPI::PropertyBuilder::CreatePropertySingleValue ( const GS::UniString & propertySetName,
const GS::UniString & name,
const IFCAPI::Value & value ) const

Create an IFC property single value.

Since
Archicad 28
Parameters
propertySetName[in] name of the property set which contains the property.
name[in] name of the IFC property.
value[in] value of the IFC property.
Returns
If able, an IFC property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC properties using IFC Hooks.

◆ CreatePropertyTableValue()

ACAPI::Result< IFCAPI::Property > IFCAPI::PropertyBuilder::CreatePropertyTableValue ( const GS::UniString & propertySetName,
const GS::UniString & name,
const std::vector< IFCAPI::Value > & definingValues,
const std::vector< IFCAPI::Value > & definedValues ) const

Create an IFC property table value.

Since
Archicad 28
Parameters
propertySetName[in] name of the property set which contains the property.
name[in] name of the IFC property.
definingValues[in] list of defining values of the IFC property table value.
definedValues[in] list of defined values of the IFC property table value.
Returns
If able, an IFC property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to map data to Objects' IFC properties using IFC Hooks.

◆ CreateValue()

ACAPI::Result< Value > IFCAPI::PropertyBuilder::CreateValue ( const IFCAPI::IFCType & valueType,
const IFCAPI::AnyValue & anyValue ) const

Create an IFC value.

Since
Archicad 28
Parameters
valueType[in] type of the value as defined in the IFC schema, e.g. "IfcBoolean".
anyValue[in] value of the IFC value.
Returns
If able, an IFC value object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Invalid parameter passed.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Result can be used to create IFC properties.

◆ FindElementsByGlobalId()

ACAPI::Result< std::unordered_set< IFCAPI::ObjectID > > IFCAPI::ObjectAccessor::FindElementsByGlobalId ( const IfcGloballyUniqueId & globalId) const

Find elements having a certain IFC identifier.

Since
Archicad 28
Parameters
globalId[in] IFC entity identifier.
Returns
If able, a set of ObjectID, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
This function searches for elements having the passed IFC identifier.
  • It returns only one element, if the given parameter is a unique GlobalId. (for example the element was created in Archicad)
  • It can return multiple elements, if the given parameter is an external GlobalId. (for example an IFC file was imported more then once, or was placed as multiple instances of the same hotlink module)
Example
auto elementsResult = IFCAPI::GetObjectAccessor ().FindElementsByGlobalId (globalId);
GS::ErrorStatus status;
if (elementsResult.IsOk ()) {
GS::Array<API_Neig> neigs;
for (const auto& elementID : elementsResult.Unwrap ()) {
auto elementGuid = IFCAPI::GetObjectAccessor ().GetAPIElementID (elementID);
if (elementGuid.IsOk ()) {
API_Neig neig{};
neig.guid = elementGuid.Unwrap ();
neigs.Push (neig);
}
}
ACAPI_Selection_Select (neigs, true);

◆ GenerateHashValue()

ULong IFCAPI::ObjectID::GenerateHashValue ( ) const

For use as Hash key.

Since
Archicad 28
Returns
Hash code

◆ GetAnyValue()

IFCAPI::AnyValue IFCAPI::Value::GetAnyValue ( ) const

The value.

Since
Archicad 28
Returns
Value of Value.
Remarks
It could be std::nullopt.

◆ GetAPIElementID()

ACAPI::Result< API_Guid > IFCAPI::ObjectAccessor::GetAPIElementID ( const IFCAPI::ObjectID & objectID) const

Get Archicad element guid from an IFC ObjectID.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, an API_Guid, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Project doesn't contain an element with the given objectID.
  • APIERR_BADELEMENTTYPE - ObjectID does not identify an Archicad element.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
Result can be used with API_Elem_Head and related ACAPI functions
Example
auto elementsResult = IFCAPI::GetObjectAccessor ().FindElementsByGlobalId (globalId);
GS::ErrorStatus status;
if (elementsResult.IsOk ()) {
GS::Array<API_Neig> neigs;
for (const auto& elementID : elementsResult.Unwrap ()) {
auto elementGuid = IFCAPI::GetObjectAccessor ().GetAPIElementID (elementID);
if (elementGuid.IsOk ()) {
API_Neig neig{};
neig.guid = elementGuid.Unwrap ();
neigs.Push (neig);
}
}
ACAPI_Selection_Select (neigs, true);

◆ GetAssignments()

ACAPI::Result< IFCAPI::Assignments > IFCAPI::ObjectAccessor::GetAssignments ( ) const

Get the persistent Assignment Tree.

Since
Archicad 28
Returns
If able, the Assignment descriptor object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Example
auto assignments = IFCAPI::GetObjectAccessor ().GetAssignments ();
const auto rootGroups = assignments->GetRootGroups ();
for (const auto& root : rootGroups)
objectIDs.Add (root);
for (const auto& [childKey, childValue] : assignments->GetChildObjectTable ())
objectIDs.Add (childKey);

◆ GetAttributes()

ACAPI::Result< std::vector< Attribute > > IFCAPI::PropertyAccessor::GetAttributes ( ) const

Get the entity's IFC attributes.

Since
Archicad 28
Returns
If able, a list of Attribute objects, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Example
auto attributes = propertyAccessor.GetAttributes ();
if (attributes.IsErr ())
return ToStatus (attributes.UnwrapErr ());

◆ GetChildObjectTable()

std::unordered_map< IFCAPI::ObjectID, std::unordered_set< IFCAPI::ObjectID > > IFCAPI::Assignments::GetChildObjectTable ( ) const

Returns a table representing the nested child hierarchy.

Since
Archicad 28
Returns
A table representing the nested child hierarchy.
Example
auto assignments = IFCAPI::GetObjectAccessor ().GetAssignments ();
const auto rootGroups = assignments->GetRootGroups ();
for (const auto& root : rootGroups)
objectIDs.Add (root);
for (const auto& [childKey, childValue] : assignments->GetChildObjectTable ())
objectIDs.Add (childKey);

◆ GetDefinedValues()

std::vector< IFCAPI::Value > IFCAPI::PropertyTableValue::GetDefinedValues ( ) const

Get list of defined property values.

Since
Archicad 28
Returns
List of Value.

◆ GetDefiningValues()

std::vector< IFCAPI::Value > IFCAPI::PropertyTableValue::GetDefiningValues ( ) const

Get list of defining property values.

Since
Archicad 28
Returns
List of Value.

◆ GetDescription() [1/2]

std::optional< GS::UniString > IFCAPI::Classification::GetDescription ( ) const

Description of the IfcClassification.

Since
Archicad 28
Returns
Description of the IfcClassification or std::nullopt if it's not filled.

◆ GetDescription() [2/2]

std::optional< GS::UniString > IFCAPI::ClassificationReference::GetDescription ( ) const

Description of the IfcClassificationReference.

Since
Archicad 29
Returns
Description of the IfcClassificationReference or std::nullopt if it's not filled.

◆ GetEdition()

std::optional< GS::UniString > IFCAPI::Classification::GetEdition ( ) const

Edition of the IfcClassification.

Since
Archicad 28
Returns
Edition of the IfcClassification or std::nullopt if it's not filled.

◆ GetEditionDate()

std::optional< GS::UniString > IFCAPI::Classification::GetEditionDate ( ) const

EditionDate of the IfcClassification.

Since
Archicad 28
Returns
EditionDate of the IfcClassification or std::nullopt if it's not filled.

◆ GetEnumerationReference()

std::vector< IFCAPI::Value > IFCAPI::PropertyEnumeratedValue::GetEnumerationReference ( ) const

Get list of property values of the enumeration reference.

Since
Archicad 28
Returns
list of Values.

◆ GetEnumerationValues()

std::vector< IFCAPI::Value > IFCAPI::PropertyEnumeratedValue::GetEnumerationValues ( ) const

Get list of property values of the enumeration.

Since
Archicad 28
Returns
List of Values.

◆ GetExternalGlobalId()

ACAPI::Result< IfcGloballyUniqueId > IFCAPI::ObjectAccessor::GetExternalGlobalId ( const IFCAPI::ObjectID & objectID) const

Get external IFC Identifier for an IFC entity.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, IfcGloballyUniqueId, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_CANCEL - The entity wasn't imported from IFC.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
If the entity was imported from IFC, it results the external IfcGloballyUniqueId, otherwise APIERR_CANCEL. This value can also be seen in IFC Project Manager.

◆ GetGlobalId()

ACAPI::Result< IfcGloballyUniqueId > IFCAPI::ObjectAccessor::GetGlobalId ( const IFCAPI::ObjectID & objectID) const

Get IFC Identifier for an IFC entity.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, IfcGloballyUniqueId, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
This value will be used during the export process.
Example
GS::HashSet<IFCAPI::ObjectID> objectIDs;
status = CollectObjectIDsFromPlan (objectIDs);
if (status.IsOK ()) {
for (const auto& objectID : objectIDs) {
auto ifcTypeResult = IFCAPI::GetObjectAccessor ().GetIFCType (objectID);
if (ifcTypeResult.IsOk ()) {
auto globalId (IFCAPI::GetObjectAccessor ().GetGlobalId (objectID));
if (globalId.IsOk ()) {

◆ GetHookManager()

HookManager IFCAPI::GetHookManager ( )
inline

Get HookManager to register an add-on for IFC hook callbacks.

Since
Archicad 28
Returns
The HookManager
Remarks
See IFCHook_Test.cpp for a complete example.

◆ GetIdentification()

std::optional< GS::UniString > IFCAPI::ClassificationReference::GetIdentification ( ) const

Identification of the IfcClassificationReference.

Since
Archicad 28
Returns
Identification of the IfcClassificationReference or std::nullopt if it's not filled.

◆ GetIfcRelAssignsToGroup()

ACAPI::Result< IFCAPI::ObjectID > IFCAPI::HookAssignments::GetIfcRelAssignsToGroup ( const IFCAPI::ObjectID groupObjectID) const

Get the IFC RelAssignsToGroup object of the passed group object.

Since
Archicad 28
Parameters
groupObjectID[in] ObjectID of the group object.
Returns
An ObjectID identifier of the owner group.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Passed object is not a group.
Remarks
When a group is created, the necessary relations are also added. You can ignore them, unless you want to manipulate their properties with the hook. If you do, use the Get functions here to find out which one is queried in the hook. Check the IFC schema on the web for further info about GetIfcRelAssignsToGroup.
Example
auto groupResult = hookAssignments.CreateIfcGroup (guid, type, name, addAsRoot);
if (groupResult.IsOk ()) {
auto group = groupResult.Unwrap ();
myGroupingData.groupObjects.emplace (group);
hookAssignments.AssignObjects (group, GetElementObjects (toAssign));
if (toService.has_value ())
hookAssignments.ServiceBuildings (group, GetElementObjects (*toService));
if (name.has_value ()) {
auto relAssigns = hookAssignments.GetIfcRelAssignsToGroup (group);
if (relAssigns.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relAssigns, *name);
auto relServices = hookAssignments.GetIfcRelServicesBuildings (group);
if (relServices.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relServices, *name);
}
}

◆ GetIfcRelAssociatesClassificationName()

GS::UniString IFCAPI::ClassificationReference::GetIfcRelAssociatesClassificationName ( ) const

Name of the IfcRelAssociatesClassification.

Since
Archicad 28
Returns
Name of the IfcRelAssociatesClassification.

◆ GetIfcRelServicesBuildings()

ACAPI::Result< IFCAPI::ObjectID > IFCAPI::HookAssignments::GetIfcRelServicesBuildings ( const IFCAPI::ObjectID systemObjectID) const

Get the IFC RelServicesBuildings object of the passed system object.

Since
Archicad 28
Parameters
systemObjectID[in] ObjectID of the system object.
Returns
An ObjectID identifier of the owner system.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Passed object is not a system subtype.
Remarks
When a group is created, the necessary relations are also added. You can ignore them, unless you want to manipulate their properties with the hook. If you do, use the Get functions here to find out which one is queried in the hook. Check the IFC schema on the web for further info about IfcRelServicesBuildings.
Example
auto groupResult = hookAssignments.CreateIfcGroup (guid, type, name, addAsRoot);
if (groupResult.IsOk ()) {
auto group = groupResult.Unwrap ();
myGroupingData.groupObjects.emplace (group);
hookAssignments.AssignObjects (group, GetElementObjects (toAssign));
if (toService.has_value ())
hookAssignments.ServiceBuildings (group, GetElementObjects (*toService));
if (name.has_value ()) {
auto relAssigns = hookAssignments.GetIfcRelAssignsToGroup (group);
if (relAssigns.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relAssigns, *name);
auto relServices = hookAssignments.GetIfcRelServicesBuildings (group);
if (relServices.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relServices, *name);
}
}

◆ GetIFCType()

ACAPI::Result< IFCType > IFCAPI::ObjectAccessor::GetIFCType ( const IFCAPI::ObjectID & objectID) const

Get IFC type of an IFC entity.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, IFCType, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Example
GS::HashSet<IFCAPI::ObjectID> objectIDs;
status = CollectObjectIDsFromPlan (objectIDs);
if (status.IsOK ()) {
for (const auto& objectID : objectIDs) {
auto ifcTypeResult = IFCAPI::GetObjectAccessor ().GetIFCType (objectID);
if (ifcTypeResult.IsOk ()) {
auto globalId (IFCAPI::GetObjectAccessor ().GetGlobalId (objectID));
if (globalId.IsOk ()) {

◆ GetListValues()

std::vector< IFCAPI::Value > IFCAPI::PropertyListValue::GetListValues ( ) const

Get list of property value.

Since
Archicad 28
Returns
List of Value.

◆ GetLocalClassificationReferences()

ACAPI::Result< std::vector< ClassificationReference > > IFCAPI::PropertyAccessor::GetLocalClassificationReferences ( ) const

Get the entity's IFC classification references.

Since
Archicad 28
Returns
If able, a list of ClassificationReference object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Returns only IFC classification references stored within the object, not calculated ones. Such classification references are currently created for objects, when they're being imported from IFC, or you're editing their IFC classification references manually.
Example
auto classificationReferences = propertyAccessor.GetLocalClassificationReferences ();
if (classificationReferences.IsErr ())
return ToStatus (classificationReferences.UnwrapErr ());
AddClassificationReferencesToObjectStateList (classificationReferences.Unwrap ());

◆ GetLocalProperties()

ACAPI::Result< std::vector< Property > > IFCAPI::PropertyAccessor::GetLocalProperties ( ) const

Get the entity's local IFC properties.

Since
Archicad 28
Returns
If able, a list of Property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Returns only IFC properties stored within the object, not calculated ones. Such properties are currently created for objects, when they're being imported from IFC, or you're editing their IFC properties manually.
Example
auto properties = propertyAccessor.GetLocalProperties ();
if (properties.IsErr ())
return ToStatus (properties.UnwrapErr ());
AddPropertyArrayToOS (properties.Unwrap ());

◆ GetLocation() [1/2]

std::optional< GS::UniString > IFCAPI::Classification::GetLocation ( ) const

Location of the IfcClassification.

Since
Archicad 28
Returns
Location of the IfcClassification or std::nullopt if it's not filled.

◆ GetLocation() [2/2]

std::optional< GS::UniString > IFCAPI::ClassificationReference::GetLocation ( ) const

Location of the IfcClassificationReference.

Since
Archicad 28
Returns
Location of the IfcClassificationReference or std::nullopt if it's not filled.

◆ GetLowerBoundValue()

IFCAPI::Value IFCAPI::PropertyBoundedValue::GetLowerBoundValue ( ) const

Get the lower bound of the property bounded value.

Since
Archicad 28
Returns
Value of the lower bound.

◆ GetName() [1/4]

GS::UniString IFCAPI::Attribute::GetName ( ) const

Name of the Attribute.

Since
Archicad 28
Returns
Name of the Attribute.

◆ GetName() [2/4]

GS::UniString IFCAPI::Classification::GetName ( ) const

Name of the IfcClassification.

Since
Archicad 28
Returns
Name of the IfcClassification.

◆ GetName() [3/4]

std::optional< GS::UniString > IFCAPI::ClassificationReference::GetName ( ) const

Name of the IfcClassificationReference.

Since
Archicad 28
Returns
Name of the IfcClassificationReference or std::nullopt if it's not filled.

◆ GetName() [4/4]

GS::UniString IFCAPI::Property::GetName ( ) const

Name of the IfcProperty.

Since
Archicad 28
Returns
Name of the IfcProperty.

◆ GetNominalValue()

IFCAPI::Value IFCAPI::PropertySingleValue::GetNominalValue ( ) const

Get the property value.

Since
Archicad 28
Returns
Value of PropertySingleValue.

◆ GetObjectAccessor()

ObjectAccessor IFCAPI::GetObjectAccessor ( )
inline

Get the ObjectAccessor for handle IFC objects, identifications and types.

Since
Archicad 28
Returns
The ObjectAccessor

◆ GetParentObjectTable()

std::unordered_map< IFCAPI::ObjectID, std::unordered_set< IFCAPI::ObjectID > > IFCAPI::Assignments::GetParentObjectTable ( ) const

Returns a table representing the parent hierarchy.

Since
Archicad 28
Returns
A table representing the parent hierarchy.
Remarks
Some Objects may be connected to multiple parents.
Example
const auto parentObjectTable = assignments->GetParentObjectTable ();
GS::ObjectState os;
const auto& objects = os.AddList<GS::ObjectState> ("Objects");
for (const auto& objectId : objectIDs) {
GS::ObjectState objectOS;
AddObjectIDToObjectState (objectId, objectOS);
const auto& groups = objectOS.AddList<GS::ObjectState> ("Groups");
if (parentObjectTable.find (objectId) != parentObjectTable.end ()) {
for (const auto& relation : parentObjectTable.at (objectId)) {
if (parentObjectTable.find (relation) != parentObjectTable.end ()) {
for (const auto& group : parentObjectTable.at (relation)) {

◆ GetPreviewClassificationReferences()

ACAPI::Result< std::vector< ClassificationReference > > IFCAPI::PropertyAccessor::GetPreviewClassificationReferences ( ) const

Get the entity's preview IFC classification references.

Since
Archicad 28
Returns
If able, a list of ClassificationReference objects, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Returns exportable IFC classification references, even mapped and calculated ones according to the preview Export Translator. The same can be seen in IFC Project Manager.
Example
auto classificationReferences = propertyAccessor.GetPreviewClassificationReferences ();
if (classificationReferences.IsErr ())
return ToStatus (classificationReferences.UnwrapErr ());
AddClassificationReferencesToObjectStateList (classificationReferences.Unwrap ());

◆ GetPreviewProperties()

ACAPI::Result< std::vector< Property > > IFCAPI::PropertyAccessor::GetPreviewProperties ( ) const

Get the entity's preview IFC properties.

Since
Archicad 28
Returns
If able, a list of Property object, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.
Remarks
Returns exportable IFC properties, even mapped and calculated ones according to the preview Export Translator. The same can be seen in IFC Project Manager.
Example
auto properties = propertyAccessor.GetPreviewProperties ();
if (properties.IsErr ())
return ToStatus (properties.UnwrapErr ());
AddPropertyArrayToOS (properties.Unwrap ());

◆ GetPropertyBuilder()

PropertyBuilder IFCAPI::GetPropertyBuilder ( )
inline

Get PropertyBuilder to create IFC attribute, property or classification reference.

Since
Archicad 28
Returns
The PropertyBuilder
Remarks
See IFCHook_Test.cpp for a complete example.

◆ GetPropertySetName()

GS::UniString IFCAPI::Property::GetPropertySetName ( ) const

Name of the container IfcPropertySet.

Since
Archicad 28
Returns
Name of the container IfcPropertySet.

◆ GetReferencedSource()

IFCAPI::Classification IFCAPI::ClassificationReference::GetReferencedSource ( ) const

ReferencedSource of the IfcClassificationReference.

Since
Archicad 28
Returns
ReferencedSource of the IfcClassificationReference.

◆ GetRootGroups()

std::unordered_set< IFCAPI::ObjectID > IFCAPI::Assignments::GetRootGroups ( ) const

Returns all root IFC groups.

Since
Archicad 28
Returns
Root IFC groups.
Example
auto assignments = IFCAPI::GetObjectAccessor ().GetAssignments ();
const auto rootGroups = assignments->GetRootGroups ();
for (const auto& root : rootGroups)
objectIDs.Add (root);
for (const auto& [childKey, childValue] : assignments->GetChildObjectTable ())
objectIDs.Add (childKey);

◆ GetSetPointValue()

IFCAPI::Value IFCAPI::PropertyBoundedValue::GetSetPointValue ( ) const

Get the set point of the property bounded value.

Since
Archicad 28
Returns
Value of the set point.

◆ GetSort()

std::optional< GS::UniString > IFCAPI::ClassificationReference::GetSort ( ) const

Sort of the IfcClassificationReference.

Since
Archicad 29
Returns
Sort of the IfcClassificationReference or std::nullopt if it's not filled.

◆ GetSource()

std::optional< GS::UniString > IFCAPI::Classification::GetSource ( ) const

Source of the IfcClassification.

Since
Archicad 28
Returns
Source of the IfcClassification or std::nullopt if it's not filled.

◆ GetStoryIndex()

ACAPI::Result< short > IFCAPI::ObjectAccessor::GetStoryIndex ( const IFCAPI::ObjectID & objectID) const

Get Archicad story index from an IFC ObjectID.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, the index, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Project doesn't contain a story with the given index.
  • APIERR_BADELEMENTTYPE - ObjectID does not identify an Archicad story.
  • APIERR_MODULNOTINSTALLED - IFC In-Out add-on is not present.
Remarks
Result can be used to identify a story and use it's info in IFC hook based mapping
Example
[[nodiscard]] bool GetStoryLevel (const IFCAPI::ObjectID& objectID, double& level)
{
bool success = false;
level = 0.0;
auto storyIndex = IFCAPI::GetObjectAccessor ().GetStoryIndex (objectID);
if (storyIndex.IsOk ()) {
API_StoryInfo storyInfo{};
if (ACAPI_ProjectSetting_GetStorySettings (&storyInfo) == NoError) {
for (short i = 0; (i <= storyInfo.lastStory - storyInfo.firstStory); ++i) {
if ((*storyInfo.data)[i].index == *storyIndex) {
level = (*storyInfo.data)[i].level;
success = true;
break;
}
}
BMKillHandle ((GSHandle*)&storyInfo.data);
}
}
return success;
}

◆ GetType()

IFCAPI::IFCType IFCAPI::Value::GetType ( ) const

The type of the Value (For example: IfcLabel, IfcPositiveLengthMeasure, ...)

Since
Archicad 28
Returns
IFCType of Value.

◆ GetTyped()

PropertyByType IFCAPI::Property::GetTyped ( ) const

Instance of the specific property type.

Since
Archicad 28
Returns
Instance of the specific property type.

◆ GetTypeObjectIFCType()

ACAPI::Result< IFCType > IFCAPI::ObjectAccessor::GetTypeObjectIFCType ( const IFCAPI::ObjectID & objectID) const

Get IFC type of the IfcTypeObject of an IFC entity.

Since
Archicad 28
Parameters
objectID[in] to identify the IFC entity.
Returns
If able, IFCType, otherwise Error.
  • NoError - The function has completed with success.
  • APIERR_BADID - Invalid value passed in the objectID parameter.
  • APIERR_MODULNOTINSTALLED - IFC add-on is not present.

◆ GetUpperBoundValue()

IFCAPI::Value IFCAPI::PropertyBoundedValue::GetUpperBoundValue ( ) const

Get the upper bound of the property bounded value.

Since
Archicad 28
Returns
Value of the upper bound.

◆ GetValue()

std::optional< GS::UniString > IFCAPI::Attribute::GetValue ( ) const

Value of the Attribute.

Since
Archicad 28
Returns
Value of the Attribute.
Remarks
Optional attributes can have no value.

◆ GetValueType()

IFCAPI::IFCType IFCAPI::Attribute::GetValueType ( ) const

Value type of the Attribute.

Since
Archicad 28
Returns
Value type of the Attribute.

◆ operator!=()

bool IFCAPI::ObjectID::operator!= ( const IFCAPI::ObjectID & other) const

Inequality operator.

Since
Archicad 28
Parameters
other[in] other
Returns
Inequality result

◆ operator==()

bool IFCAPI::ObjectID::operator== ( const IFCAPI::ObjectID & other) const

Equality operator.

Since
Archicad 28
Parameters
other[in] other
Returns
Equality result

◆ PropertyAccessor()

IFCAPI::PropertyAccessor::PropertyAccessor ( const IFCAPI::ObjectID & objectID)

Get PropertyAccessor to access IFC attributes, properties and classification references.

Since
Archicad 28
Parameters
objectID[in] identifies the IFC entity.

◆ RegisterAssignmentsHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterAssignmentsHook ( const IFCAPI::HookManager::AssignmentsHookFunction & callback)

Register for the IFC assignments export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying the custom assignment structure.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterAttributeHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterAttributeHook ( const IFCAPI::HookManager::AttributeHookFunction & callback)

Register for the IFC attribute export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an object's attributes.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterClassificationReferenceHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterClassificationReferenceHook ( const IFCAPI::HookManager::ClassificationReferenceHookFunction & callback)

Register for the IFC classification reference export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an object's classification references.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterPropertyHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterPropertyHook ( const IFCAPI::HookManager::PropertyHookFunction & callback)

Register for the IFC property export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an object's properties.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterTypeObjectAttributeHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectAttributeHook ( const IFCAPI::HookManager::AttributeHookFunction & callback)

Register for the IFC type objects' attribute export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an element's IFC type object's attributes.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering. Type objects are generated for each element based on their data, and similar type objects are merged in the end.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterTypeObjectClassificationReferenceHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectClassificationReferenceHook ( const IFCAPI::HookManager::ClassificationReferenceHookFunction & callback)

Register for the IFC type objects' classification reference export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an element's IFC type object's classification references.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering. Type objects are generated for each element based on their data, and similar type objects are merged in the end.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ RegisterTypeObjectPropertyHook()

ACAPI::Result< void > IFCAPI::HookManager::RegisterTypeObjectPropertyHook ( const IFCAPI::HookManager::PropertyHookFunction & callback)

Register for the IFC type objects' property export hook.

Since
Archicad 28
Parameters
callback[in] the function which can be called, when querying an element's IFC type object's properties.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Function already registered.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering. Type objects are generated for each element based on their data, and similar type objects are merged in the end.
Example
static void RegisterHooks ()
{
IFCAPI::GetHookManager ().RegisterTypeObjectClassificationReferenceHook (TypeObjectClassificationReferenceHook);
}

◆ ServiceBuildings()

ACAPI::Result< void > IFCAPI::HookAssignments::ServiceBuildings ( const IFCAPI::ObjectID systemID,
const std::vector< IFCAPI::ObjectID > & servicedObjectIDs )

Set serviced spatial element objects to the passed system object.

Since
Archicad 28
Parameters
systemID[in] ObjectID of the system object.
servicedObjectIDs[in] List of spatial elements serviced by the passed system.
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - Passed object is not a system subtype, or servicedObjectIDs contains an objectID, which can't be connected.
Remarks
Not all invalid assignment cases are represented in the return value here, but no invalid result will be generated in the IFC export. Check the IFC schema on the web for further info about IfcRelServicesBuildings.
Example
auto groupResult = hookAssignments.CreateIfcGroup (guid, type, name, addAsRoot);
if (groupResult.IsOk ()) {
auto group = groupResult.Unwrap ();
myGroupingData.groupObjects.emplace (group);
hookAssignments.AssignObjects (group, GetElementObjects (toAssign));
if (toService.has_value ())
hookAssignments.ServiceBuildings (group, GetElementObjects (*toService));
if (name.has_value ()) {
auto relAssigns = hookAssignments.GetIfcRelAssignsToGroup (group);
if (relAssigns.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relAssigns, *name);
auto relServices = hookAssignments.GetIfcRelServicesBuildings (group);
if (relServices.IsOk ())
myGroupingData.relationToGroupNameTable.emplace (*relServices, *name);
}
}

◆ UnregisterAssignmentsHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterAssignmentsHook ( )

Unregister from the IFC assignments export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterAttributeHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterAttributeHook ( )

Unregister from the IFC attribute export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterClassificationReferenceHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterClassificationReferenceHook ( )

Unregister from the IFC classification reference export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterPropertyHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterPropertyHook ( )

Unregister from the IFC property export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterTypeObjectAttributeHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectAttributeHook ( )

Unregister from the IFC type objects' attribute export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterTypeObjectClassificationReferenceHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectClassificationReferenceHook ( )

Unregister from the IFC type objects' classification reference export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example

◆ UnregisterTypeObjectPropertyHook()

ACAPI::Result< void > IFCAPI::HookManager::UnregisterTypeObjectPropertyHook ( )

Unregister from the IFC type objects' property export hook.

Since
Archicad 28
Returns
Success of the operation
  • NoError - The function has completed with success.
  • APIERR_BADPARS - No registration found this hook.
Remarks
Make sure you call Register and Unregister function in pairs. Once registered, the addon has to stay loaded and have the function available until unregistering.
Example