Interface EffectivityItemInterface

The EffectivityItemInterface is a requirement used for the configuration system.

The configuration system is explained in the configurations.

The EffectivityItemInterface is included in the EffectivitiesInterface, and tells a requirement that must or must not be satisfied in order for a part instance to be included in a configuration.

The EffectivityItemInterface tells the attribute name and the accepted/rejected values that a document must feature in order to be accepted/rejected.

/** 
* 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 EffectivityItemInterface {
    getKey(): string;
    getSortedEffectivities(): string[];
}

Methods

  • Gets the attribute name of the requirement.

    Returns string

    The attribute name of the requirement.

  • Gets the accepted/rejected values of the requirement.

    Such a list is sorted by values.

    DO NOT modify the returned string array.

    Returns string[]

    const
    The accepted/rejected values of the requirement.