Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
It is possible to add an object that will be included in the callback to avoid creating too many closures.
Calling twice addEventListener with the same parameters results in the second call to be ignored,
only unique pairs callback / object are allowed, in order to avoid calling multiple times the same
thing.
The id of the inserted callback (actually an UUID).
Adds a listener to an event type.
When an event of the type pType fires, the callback pListener will be called. This function
returns a unique string id that may be used in removeEventListenerById to allow simple
listener removal.
The id of the inserted callback (actually an UUID).
Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the InfiniteObjectDispatcherInterfaceSignal.ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed, getInfiniteObjectType and application id retrieval) will log a message with LogLevel.LL_UsingDisposedObject.
Sets the content of the FilterItemInterface from a former call to toJSON.
Use addEventListener on the event FilterItemInterfaceSignal.FilterDataChanged to know when the FilterItemInterface internal data changed.
{
"$defs": {
"all": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "all",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"id"
],
"title": "Filter all definition",
"type": "object"
},
"attribute": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"containsValues": {
"description": "Elects all the `part instances` having the attribute whose name set with attribute in their `joined attribute set` that have a value that contains at least one of the values in the given string array",
"items": {
"type": "string"
},
"type": "array"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"exactValues": {
"description": "Elects all the `part instances` having the attribute whose name set with `attribute` in their `joined attribute set` that have a value exactly included in the given string array.",
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"na": {
"description": "Include `part instances` with the `N/A` value",
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "attribute",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"enabled",
"operator",
"inverted",
"exactValues",
"containsValues",
"na",
"attribute",
"id"
],
"title": "Filter attribute definition",
"type": "object"
},
"boolean": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "boolean",
"description": "Type of the filter",
"type": "string"
},
"value": {
"default": false,
"description": "Boolean value of the filter",
"example": false,
"type": "boolean"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"value",
"id"
],
"title": "Filter boolean definition",
"type": "object"
},
"box": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"max": {
"description": "Define the coordinates [x,y,z] of the max point of the AABB",
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"min": {
"description": "Define the coordinates [x,y,z] of the min point of the AABB",
"items": {
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"overlap": {
"description": "Specify if AABB test is included or overlap",
"example": true,
"type": "boolean"
},
"precision": {
"description": "Numeric precision will be subtracted/added to min/max point of AABB",
"type": "number"
},
"type": {
"const": "box",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"inverted",
"enabled",
"min",
"max",
"overlap",
"precision",
"id"
],
"title": "Filter box definition",
"type": "object"
},
"compound": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"subfilters": {
"description": "list of metadata sub filters",
"items": {
"$ref": "#/$defs/compoundfilters"
},
"type": "array"
},
"type": {
"const": "compound",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"subfilters",
"id"
],
"title": "Filter compound definition",
"type": "object"
},
"compoundfilters": {
"oneOf": [
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/range"
}
]
},
"diagonal": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"rangeitems": {
"description": "List of range item",
"items": {
"$ref": "#/$defs/rangeitem"
},
"type": "array"
},
"type": {
"const": "diagonal",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"rangeitems",
"id"
],
"title": "Filter diagonal definition",
"type": "object"
},
"filter": {
"oneOf": [
{
"$ref": "#/$defs/box"
},
{
"$ref": "#/$defs/all"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/literal"
},
{
"$ref": "#/$defs/compound"
},
{
"$ref": "#/$defs/diagonal"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/partinstanceidlist"
},
{
"$ref": "#/$defs/range"
},
{
"$ref": "#/$defs/filterset"
}
]
},
"filterset": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"subfilters": {
"description": "List of sub filters",
"items": {
"oneOf": [
{
"$ref": "#/$defs/box"
},
{
"$ref": "#/$defs/all"
},
{
"$ref": "#/$defs/attribute"
},
{
"$ref": "#/$defs/boolean"
},
{
"$ref": "#/$defs/literal"
},
{
"$ref": "#/$defs/compound"
},
{
"$ref": "#/$defs/diagonal"
},
{
"$ref": "#/$defs/hasfield"
},
{
"$ref": "#/$defs/partinstanceidlist"
},
{
"$ref": "#/$defs/range"
},
{
"$ref": "#/$defs/filterset"
}
]
},
"type": "array"
},
"type": {
"const": "set",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"enabled",
"operator",
"inverted",
"subfilters",
"id"
],
"title": "Filter set definition",
"type": "object"
},
"hasfield": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "hasfield",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"id"
],
"title": "Filter Has field definition",
"type": "object"
},
"literal": {
"additionalProperties": false,
"properties": {
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"query": {
"description": "Sets the query string in the 3djuump infinite literal and search query language",
"example": ":PartNumber=='bolt'",
"type": "string"
},
"type": {
"const": "literal",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"query",
"id"
],
"title": "Filter literal definition",
"type": "object"
},
"partinstanceidlist": {
"additionalProperties": false,
"properties": {
"buildid": {
"description": "Id of the build use to create the part list instance",
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"list": {
"description": "List of part instance ids",
"items": {
"type": "number"
},
"type": "array"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"type": {
"const": "partinstanceidlist",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"buildid",
"list",
"id"
],
"title": "Filter Part instance list definition",
"type": "object"
},
"range": {
"additionalProperties": false,
"properties": {
"attribute": {
"description": "Name of the attribute to filter with",
"example": "PartNumber",
"minLength": 0,
"type": "string"
},
"enabled": {
"default": true,
"description": "If disabled, this filter is completely ignored during all the computations",
"example": true,
"type": "boolean"
},
"id": {
"description": "an object id : only ascii non control and non blank characters",
"example": "123e4567e89b12d3a456426614174000",
"maxLength": 64,
"pattern": "^[\\x21-\\x7E]{1,64}$",
"type": "string"
},
"inverted": {
"description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
"example": true,
"type": "boolean"
},
"operator": {
"default": "and",
"description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
"enum": [
"or",
"and",
"minus"
],
"example": "or",
"type": "string"
},
"rangeitems": {
"description": "List of range item",
"items": {
"$ref": "#/$defs/rangeitem"
},
"type": "array"
},
"type": {
"const": "range",
"description": "Type of the filter",
"type": "string"
},
"version": {
"description": "Define the version of the object",
"example": 1,
"type": "integer"
}
},
"required": [
"type",
"operator",
"enabled",
"inverted",
"attribute",
"rangeitems",
"id"
],
"title": "Filter range definition",
"type": "object"
},
"rangeitem": {
"additionalProperties": false,
"properties": {
"includedLower": {
"description": "Sets if the lower bound value should be included or excluded",
"type": "boolean"
},
"includedUpper": {
"description": "Sets if the upper bound value should be included or excluded",
"type": "boolean"
},
"lower": {
"description": "Lower bound of the range item",
"type": "number"
},
"upper": {
"description": "Upper bound of the range item",
"type": "number"
}
},
"required": [
"includedLower",
"includedUpper"
],
"title": "Range item definition",
"type": "object"
}
},
"$ref": "#/$defs/filter",
"$schema": "https://json-schema.org/draft-07/schema#"
}
true if the data is set.
Gets the operator to apply with this FilterItemInterface and its closest enabled predecessor in its parent container.
The FilterItemInterface operator of the first enabled FilterItemInterface in a parent list (WorkingSetInterface, FilterSetInterface, FilterCompoundInterface) is always ignored, but a warning is outputted in the console when the GroupOperator is different that GroupOperator.GO_UNION.
A FilterItemInterface has the GroupOperator.GO_UNION operator by default.
The operator to combine this FilterItemInterface and its first enabled predecessor.
Gets the type of the FilterItemInterface.
The FilterItemInterface type.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned after the update of the WorkingSetInterface this filter belongs to.
This helps get the filter that is in error if the WorkingSetInterface is in error.
The error message is updated If the containing WorkingSetInterface is modified and DataSessionInterface.update is called.
An InfiniteError containing the last error if any, or undefined if no error occurred.
Gets the parent container that contains this FilterItemInterface (getFilterId()).
Such a container may be a FilterSetInterface or a FilterCompoundInterface. Returns an empty string if the FilterItemInterface is not included in a parent container or directly inside a WorkingSetInterface.
The parent container if any.
Gets the identifier of the parent container that contains this FilterItemInterface (getFilterId()).
Such a container may be a FilterSetInterface or a FilterCompoundInterface. Returns an empty string if the FilterItemInterface is not included in a parent container or directly inside a WorkingSetInterface.
The identifier of the parent container.
Tells if the EventDispatcher has such a callback registered for the given event type.
true if such a listener is installed for the given type of event.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the FilterItemInterface is enabled.
If disabled, this FilterItemInterface is completely ignored during all the computations (the behavior is the same as if it had not been created).
A FilterItemInterface is enabled by default.
true if the FilterItemInterface is enabled.
Tells if the FilterItemInterface is "inverted".
When "inverted", a FilterItemInterface elects all the part instances that were not selected if it was not inverted.
A FilterItemInterface is not "inverted" by default.
true if such a FilterItemInterface is "inverted".
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
true if the callback was removed else false.
Removes a listener from an event type.
If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.
The listener function that gets removed.
true if the callback was removed else false.
Removes a listener by its id.
If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.
true if the callback was removed else false.
Sets the FilterItemInterface enabled/disabled status.
If disabled, this FilterItemInterface is completely ignored during all the computations (the behavior is the same as if it had not been created). Use addEventListener on the event FilterItemInterfaceSignal.FilterEnabledChanged to know when the FilterItemInterface has changed its enabled status. Modifying a disabled FilterItemInterface will not trigger any change in the containing FilterSetInterface / WorkingSetInterface.
A FilterItemInterface is enabled by default.
Sets the operator to apply with this FilterItemInterface and its closest enabled predecessor in its parent container.
The FilterItemInterface operator of the first enabled FilterItemInterface in a parent list (WorkingSetInterface, FilterSetInterface, FilterCompoundInterface) is always ignored, but a warning is outputted in the console when the GroupOperator is different that GroupOperator.GO_UNION. Use addEventListener on the event FilterItemInterfaceSignal.FilterInvertedChanged to know when the FilterItemInterface operator changed.
A FilterItemInterface has the GroupOperator.GO_UNION operator by default.
Sets the "inverted" status of the FilterItemInterface.
When "inverted", a FilterItemInterface elects all the part instances that were not selected if it was not inverted.
Use addEventListener on the event FilterItemInterfaceSignal.FilterInvertedChanged
to know when the FilterItemInterface has changed its "inverted" status.
A FilterItemInterface is not "inverted" by default.
Gets a deep copy of the internal data of the FilterItemInterface.
Please refer to JSON.stringify.
Optional pKey: anyThe internal FilterItemInterface data.
The FilterAllPartsInterface interface is the easiest FilterItemInterface.
This FilterItemInterface elects all the
part instancesof the DMU. A WorkingSetInterface that contains only a FilterAllPartsInterface will contain allpart instance idsbetween 1 and DataSessionInterface.getMaximumPartInstanceLeafId included (thus a length of DataSessionInterface.getMaximumPartInstanceLeafId) and allgeometric instance idsbetween 1 and DataSessionInterface.getMaximumGeometricId included (thus a length of DataSessionInterface.getMaximumGeometricId).The FilterAllPartsInterface interface is created through the DataSessionInterface.createFilterAllParts.
The FilterAllPartsInterface has the type FilterType.FT_ALL (FilterItemInterface.getFilterType).
The FilterAllPartsInterface has a depth contribution of 1.
Please refer to Available Filters for a list of other FilterItemInterfaces.
See