AttributeManagerImportCallback is responsible for registering and handling file types to the AttributeManager through API. You can make your own implementation to add the possibility to import attributes from your own file format.
More...
#include <AttributeManagerImportCallback.hpp>
|
ACAPI::Error | status |
| The error status of the registration.
|
|
const API_Guid | serviceIdentifier |
| Identifier given by constructor.
|
|
AttributeManagerImportCallback is responsible for registering and handling file types to the AttributeManager through API. You can make your own implementation to add the possibility to import attributes from your own file format.
- Since
- Archicad 29
- Example
public:
AttributeManagerImportTestCallback ()
: ACAPI::AttributeManagerImportCallback ("txt")
{}
~AttributeManagerImportTestCallback ()
{}
GSErrCode ImportAttributeProcess (const IO::Location& , GS::Array<GS::Pair<API_Attribute, API_AttributeDefExt*>>& ) const override
{
return NoError;
}
{
return { 'TEXT', 'GSAC', "Test txt file", "txt" };
}
};
◆ AttributeManagerImportCallback()
ACAPI::AttributeManagerImportCallback::AttributeManagerImportCallback |
( |
const GS::UniString & | fileExtension | ) |
|
Constructs a new attribute manager callback.
- Parameters
-
fileExtension | The extension of the registered file type. |
◆ GetFileTypeFormat()
Provide the new file type, that should be registered on the AttributeManager dialog.
- Returns
- The new file type.
◆ ImportAttributeProcess()
virtual GSErrCode ACAPI::AttributeManagerImportCallback::ImportAttributeProcess |
( |
const IO::Location & | sourceFile, |
|
|
GS::Array< GS::Pair< API_Attribute, API_AttributeDefExt * > > & | result ) const |
|
pure virtual |
The import logic from the new file type.
- Parameters
-
sourceFile | Source File Location. |
result | The result array where the new attributes are inserted by the import process. |
- Returns
- NoError, Cancel, or other Error code.