Enumeration FilterSetInterfaceSignal

The FilterSetInterfaceSignal lists all the signals that may be sent by a FilterSetInterface.

These signals are emitted by the FilterSetInterface when it is modified.

There is no way to know when the FilterSetInterface is ready : the FilterSetInterface is contained inside a WorkingSetInterface that notifies when it is ready. As such, there is no way to get the part instances or geometric instances that are included in such a FilterSetInterface.

As a FilterItemInterface, the FilterSetInterface also fires FilterItemInterfaceSignals.

The FilterSetInterface may fire the following signals :

/** 
* Sample to illustrate how to use the FilterSetInterface signals (FilterSetInterfaceSignal).
*/
import { FilterSetInterfaceSignal, FilterSetInterface, DataSessionInterface } from 'generated_files/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;
// create a FilterSetInterface
const lFilterSet : FilterSetInterface = lDataSession.createFilterSet();

// we want to be notified when events occur, here added filter
const lCallbackId : string = lFilterSet.addEventListener(FilterSetInterfaceSignal.FilterAdded, (_event: any, _pObject: Object | undefined) =>
{
// output a fancy message when a filter is added
console.log('A filter has been added to the filter set interface');
// and remove the listener
lFilterSet.removeEventListenerById(lCallbackId);
});

// insert an all parts filter, that fires the event FilterSetInterfaceSignal.FilterAdded
lFilterSet.insertFilter(-1, lDataSession.createFilterAllParts());
// => "A filter has been added to the filter set interface"

Please refer to Available Filters for a list of other FilterItemInterfaces.
Events

Enumeration Members

FilterAdded: "filterAdded"

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

The attachment is the FilterItemInterface that was added.

FilterBulkChanged: "filterBulkChanged"

Signal sent by the FilterSetInterface when a lot of changes occur inside.

No attachment for events of this type.

FilterMoved: "filterMoved"

Signal sent by the FilterSetInterface 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 the FilterMoveInfoInterface.
FilterRemoved: "filterRemoved"

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

The attachment is the id of FilterItemInterface that was removed.