Auxiliary Converter Methods
A number of auxiliary methods are provided in C3D Converter to obtain information about supported formats and loaded plugins.
Getting the list of supported formats
The list of supported formats can be obtained either through the IConverter3D interface or by using a separate API function. The list includes both exchange formats available with the standard [cnv] license and formats provided by plugins.
The following IConverter3D methods are intended for this purpose:
virtual std::vector<c3d::FormatInfo> GetSupportedImportFormats() const;
virtual std::vector<c3d::FormatInfo> GetSupportedImportForeignFormats() const;
The GetSupportedImportFormats() method returns a list of supported formats, taking into account the license key and the presence of format‑specific converter libraries. If some plugin does not support format listing, then its formats are not included in the result.
The GetSupportedImportForeignFormats() method returns a list of formats supported for import via ImportForeign(). The list will be empty if LoadForeignReader() has not been called or has failed. If some plugin does not support format listing, then its formats are not included in the result.
A separate API function is also provided to obtain the list of supported formats:
CONV_FUNC( std::vector<FormatInfo> ) GetSupportedFormats();
The GetSupportedFormats() function returns a list of supported formats, taking into account the license key and the presence of format‑specific converter libraries. If some plugin does not support format listing, then its formats are not included in the result.
The FormatInfo structure contains brief information about a format: its name and the list of supported file extensions.
Getting information about loaded plugins
To obtain information about loaded and activated plugins, the following function is used:
CONV_FUNC( std::vector<PluginVersionInfo> ) GetLoadedPluginsVersions();
The GetLoadedPluginsVersions() function returns versions of loaded plugins. The version value is defined by the plugin implementation. If a plugin does not report its version, the string “n/a” is used instead.
The PluginVersionInfo structure contains the full path to the plugin and the plugin version.
Plugin versions differ for different formats. For mechanical formats (catia, creo, nx, sw, se) and ifc, a single plugin version is used, for example 22.0.29.0. Partner plugins for construction formats (nwd, rvt, rvm, sp) have their own version numbering schemes, for example 1.4.0.0, since they have been developed independently.