Import Class
The functionality described in this article is not available in the Community SDK edition.
You should upgrade to- Engineering / Sim
SDK edition to use it.
You should upgrade to
This is an import manager class. It is used to create and manage importers, processors as well as to directly import files in non-native formats, if an importer for such files was previously registered.
You can manage the set of available importers dynamically by adding them to or removing from the registry.
You can also get the list of all currently supported file extensions.
Import Class
Members
Importer CreateImporter ( string type_name ) #
Creates a new importer of the specified type.The importer type name specified must be previously registered.
Arguments
- string type_name - Importer type name.
Return value
Pointer to a new created importer of a given type, if it was created successfully; otherwise, nullptr.Importer CreateImporterByFileName ( string file_name ) #
Creates an importer for the input file with a given name by its extension, if such an importer was previously registered.Arguments
- string file_name - Name of the input file containing the data to be imported.
Return value
bool IsSupportedExtension ( const char * extension ) #
Returns a value indicating whether the specified file extension is supported by the importer.Arguments
- const char * extension - Null-terminated string with file extension to be checked.
Return value
true if the specified file extension is supported by the importer; otherwise, false.Vector<String> GetSupportedExtensions ( ) #
Returns the list of all supported file extensions as a vector of strings.Return value
List of all supported extensions as a vector of strings.void GetSupportedExtensions ( ICollection<string> & extensions ) #
Returns the list of all supported file extensions and puts it to the given vector.Arguments
- ICollection<string> & extensions - Vector to put the list of all supported extensions to.
String GetImporterTypeByExtension ( const char * extension ) #
Returns the type of importer for the specified extension.Arguments
- const char * extension - Null-terminated string with file extension.
Return value
Type of importer for the specified extension, if it exists, as a string; otherwise, null string.void GetImporterTypes ( ICollection<string> & types ) #
Returns the list of all importer types registered by the Import Manager and puts it to the given vector.Arguments
- ICollection<string> & types - Vector to put the list of all registered importer types to.
ICollection<string> & GetImporterTypes ( ) #
Returns the list of all importer types registered by the Import Manager.Return value
List of all importer types registered by the Import Manager as a vector of strings.string DoImport ( string filepath, string output_path ) #
Imports the contents from the specified input file to the specified output path and returns the path to the resulting output file.Arguments
- string filepath - Path to an input file containing the data to be imported.
- string output_path - Output path to be used to store generated file(s) with imported data.
Return value
Path to the resulting output file.Last update:
2021-04-29
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)