Enumeration WorkingSetInterfaceSignal

The WorkingSetInterfaceSignal lists all the signals that may be sent by the WorkingSetInterface.

These signals are emitted by the WorkingSetInterface when it is modified and more importantly ready.

A WorkingSetInterface is ready when it has computed the result of its set of FilterItemInterfaces, configurations and dependency list, such a result being a list of geometric instance ids and part instance ids.

The WorkingSetInterface may fire the following signals :

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

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;

// the callback called when the conf context has changed
let myCallback : tListenerCallback;
// create a configuration Context
// we want to get geometric instances result
// if nothing is set, this working set should include all parts ('unconfigured')
const lConfContextInterface : WorkingSetInterface = lDataSession.createWorkingSet(
WorkingSetDataRetrieval.R_OnlyGeometricInstances,
WorkingSetBehavior.B_DiscardConfigurationsIfEmptyBit | WorkingSetBehavior.B_DiscardFiltersIfEmptyBit | WorkingSetBehavior.B_DiscardDependenciesIfEmptyBit
);

// gets all the configuration ids
const lConfigurations: Array<ConfigurationInterface> = lDataSession.getConfigurationList();

// add all the configurations in the conf context
const lActiveConfigurations = new Array<string>(0);
let i : number;
for (i = 0; i < lConfigurations.length; i += 1)
{
lActiveConfigurations.push(lConfigurations[i].getConfigurationId());
}
// we want to be signaled when the confContext changes
lConfContextInterface.addEventListener(WorkingSetInterfaceSignal.WorkingSetConfChanged, myCallback);
// and set the configurations
lConfContextInterface.setActiveConfs(lActiveConfigurations);
// myCallback is called right away

Please refer to the WorkingSetInterface for more information.
Events

Enumeration Members

WorkingSetCancelled: "cancelled"

Signal sent by the WorkingSetInterface when the WorkingSetInterface is cancelled, i.e. when the WorkingSetInterface is running and the content of the WorkingSetInterface is modified.

No attachment for events of this type.

WorkingSetChanged: "changed"

Signal sent by the WorkingSetInterface when any FilterItemInterface has changed, the WorkingSetInterface dependencies inside the WorkingSetInterface has changed, or the list of configuration has changed (WorkingSetInterface.setActiveConfs).

No attachment for events of this type.

WorkingSetConfChanged: "confChanged"

Signal sent by the WorkingSetInterface when the list of configurations has changed or a list of configuration has changed in a dependent WorkingSetInterface.

No attachment for events of this type.

WorkingSetDependencyAdded: "dependencyAdded"

Signal sent by the WorkingSetInterface when a WorkingSetInterface dependency has been added.

The attachment is the WorkingSetInterface dependency that was added.

WorkingSetDependencyMoved: "dependencyMoved"

Signal sent by the WorkingSetInterface when a WorkingSetInterface dependency has been moved.

The attachment is a WorkingSetMoveInfoInterface that contains the move information.

WorkingSetDependencyOperatorChanged: "dependencyOperatorChanged"

Signal sent by the WorkingSetInterface when a WorkingSetInterface has been moved.

The attachment is a GroupOperatorChangedInterface that contains the change information.

WorkingSetDependencyRemoved: "dependencyRemoved"

Signal sent by the WorkingSetInterface when a WorkingSetInterface dependency has been removed.

The attachment is the WorkingSetInterface that was removed.

WorkingSetFilterAdded: "filterAdded"

Signal sent by the WorkingSetInterface when a FilterItemInterface has been added.

The attachment is the FilterItemInterface that was added.

WorkingSetFilterBulkChanged: "bulkChanged"

Signal sent by the WorkingSetInterface when a lot of changes occur inside its list of filters.

No attachment for events of this type.

WorkingSetFilterMoved: "filterMoved"

Signal sent by the WorkingSetInterface when a FilterItemInterface has been moved.

The attachment is a FilterMoveInfoInterface :

{
"filter": "the id of the {@link FilterItemInterface} that changed",
"to": pOrder // the new position of the {@link FilterItemInterface} in the list of children of the container
}

Please refer to WorkingSetInterface.moveFilter.
WorkingSetFilterRemoved: "filterRemoved"

Signal sent by the WorkingSetInterface when a FilterItemInterface has been removed.

The attachment is the id of FilterItemInterface that was removed.

WorkingSetIdChanged: "IdChanged"

Signal sent by the abstract WorkingSetInterface when its id has changed.

The id is only used by the developer to uniquely identify filters. Modifying the id does not change the filter data internally, and as such the filter is not considered modified. Thus, no call to DataSessionInterface.update is required.

No attachment for events of this type.

WorkingSetParentChanged: "parentChanged"

Signal sent by the WorkingSetInterface when it has been set as a dependency context for a WorkingSetInterface (or unset).

The attachment is the WorkingSetInterface that is the new 'parent', or undefined if the WorkingSetInterface has been removed from the list of dependencies.

WorkingSetReady: "ready"

Signal sent by the WorkingSetInterface when the WorkingSetInterface is ready, i.e. WorkingSetInterface.getGeometricInstanceIds, WorkingSetInterface.getPartInstanceIds and WorkingSetInterface.getTrianglesCount can be called.

No attachment for events of this type.