Interface ConfigurationInterface

The ConfigurationInterface is a configuration.

The DMU may feature a list of configurations. A configuration is created by the project maintainer and made available to all users. In order to ease the possible dynamic creation of configurations in the future versions of the API, the ConfigurationInterface object shows the same attributes (some are still stripped) as the configuration object created by the project maintainer.

The configuration system is explained in the configurations.

A configuration elects always the root part instance. Then each child instance is included in the configuration if :

This algorithm is then recursively applied to all part instances to select a subset of all the part instances.

/** 
* Sample to illustrate the change of configuration in the WorkingSetInterface.
*/
import { WorkingSetInterface, DataSessionInterface, ConfigurationInterface, WorkingSetDataRetrieval, WorkingSetBehavior } from 'generated_files/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;
// create a WorkingSetInterface
// we want to get geometric instances result
// if nothing is set, this working set should include all parts ('unconfigured')
const lConfContext : WorkingSetInterface = lDataSession.createWorkingSet(
WorkingSetDataRetrieval.R_OnlyGeometricInstances,
WorkingSetBehavior.B_DiscardConfigurationsIfEmptyBit | WorkingSetBehavior.B_DiscardFiltersIfEmptyBit | WorkingSetBehavior.B_DiscardDependenciesIfEmptyBit
);
// retrieve the list of available configurations
const lActiveConfigurations : Array<ConfigurationInterface> = lDataSession.getConfigurationList();
// we will take the first ConfigurationInterface for this context
const lActualConfigurations : Array<string> = new Array<string>(1);
lActualConfigurations[0] = lActiveConfigurations[0].getConfigurationId();
console.log('Using the configuration ' + lActiveConfigurations[0].getName() + ' : ' + lActiveConfigurations[0].getDescription());
// set the active configurations
lConfContext.setActiveConfs(lActualConfigurations);
// and ask to compute all changes requested since the last call to the DataSessionInterface
lDataSession.update();

Please refer to the Configuration System.
Metadata

interface ConfigurationInterface {
    getConfigurationId(): string;
    getDescription(): string;
    getExcludedEffectivities(): EffectivitiesInterface;
    getName(): string;
    getNeededEffectivities(): EffectivitiesInterface;
}

Methods

  • Gets the description of the configuration.

    The description is a short text explaining the configuration.

    Returns string

    The description for the configuration.

  • Gets the requirements a link document must NOT satisfy in order to be included in the configuration.

    Each parent instance / child instance relationship decorated with a document that does not satisfy the getExcludedEffectivities will imply the child will be included in the configuration if the parent is itself inside the given configuration.

    DO NOT modify the returned EffectivitiesInterface.

    Returns EffectivitiesInterface

    const
    The list of requirements to dissatisfy for the given configuration.
  • Gets the "GUI" name of the configuration (as created by the project maintainer).

    Returns string

    The name of the configuration.

  • Gets the requirements a link document must satisfy in order to be included in the configuration.

    Each parent instance / child instance relationship decorated with a document that satisfies the getNeededEffectivities will imply the child will be included in the configuration if the parent is itself inside the given configuration.

    DO NOT modify the returned EffectivitiesInterface.

    Returns EffectivitiesInterface

    const
    The list of requirements to satisfy for the given configuration.