.. role:: blue :class: blue Model Configuration Import ========================== .. _Model_Configuration_Import_: .. kernel version: 118061 When importing models in the c3d format, as well as models available through the SolidWorks, NX, Creo, Inventor, and Solid Edge plugins, it is possible to read the model in different configurations (variants). Configuration import from Catia is not implemented, because configurations in Catia are stored in a parametric form that C3D Converter does not support. There are two ways to specify a configuration selector: - Pass a pointer to :blue:`IConfigurationSelector` to the :blue:`LoadForeignReader`\() method when loading a plugin for subsequent use in import methods that explicitly specify the plugin. - Use the :blue:`IConverter3D::SetConfigurationSelector`\() method for subsequent use in import methods that work through an automatically loaded plugin. To work with these methods, it is necessary to implement the :blue:`IConfigurationSelector` interface (*conv_requestor.h*). **IConfigurationSelector interface methods**: .. code-block:: cpp // Add a configuration for selection by the user. virtual void AddConfiguration( const c3d::string_t & configurationName ) = 0; // Add a configuration without a model for selection by the user. virtual void AddEmptyConfiguration( const c3d::string_t & configurationName ) { AddConfiguration( configurationName ); } // Add a configuration that needs to be updated for selection by the user. virtual void AddNeedsUpdateConfiguration( const c3d::string_t & configurationName ) { AddConfiguration( configurationName ); } // Specify the index of the active configuration. virtual void SetActiveConfiguration( const size_t index ) = 0; // Get the index of the configuration selected by the user. virtual size_t GetConfiguration() const = 0; // Index of the configuration that should be returned to cancel reading on user request. static const size_t configurationIdToCancel = SYS_MAX_T; - If :blue:`GetConfiguration`\() is not explicitly used, the default configuration specified via :blue:`SetActiveConfiguration`\() will be loaded. - The :blue:`AddEmptyConfiguration`\() and :blue:`AddNeedsUpdateConfiguration`\() methods are primarily informational, because unlike :blue:`AddConfiguration`\() they do not allow obtaining a full model due to limitations of saving the model in the source CAD system.