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.
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).
Asynchronously triggers a request to "translate" the given part instance ids to the corresponding geometric instance ids.
The server will try to find all geometric instances that are linked to the given part instance ids.
Returns a promise.
Please note that in case of multiple promises running at the same time on the same PartInstanceConverterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getGeometricInstanceIds after awaiting will return the same value.
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the requested Uint32Array.
part instance ids to perform the conversion with.Cancels the computation of the conversion process (if any).
A PartInstanceConverterCancelled signal is emitted if the PartInstanceConverterInterface is retrieving data.
true if the PartInstanceConverterInterface was running, else false.
Triggers a request to "translate" the given part instance ids to the corresponding geometric instance ids.
The server will try to find all geometric instances that are linked to the given part instance ids.
An event PartInstanceConverterReady is fired when the translation is finished,
use getLastError() to check if it was correctly performed.
Returns true if the "conversion" is started. If not, just call getLastError to
get the reason why the procedure failed. All values of the input list should be between 0 and 231-1, if not,
returns false.
true if the conversion process has started, just wait for PartInstanceConverterReady.
part instance ids to perform the conversion with.Gets rid of this object.
After this call, this object can no longer be used.
If the object is an InfiniteObjectDispatcherInterface, then the ObjectDisposed signal is emitted.
Further uses of the object (with the exception of isDisposed and getInfiniteObjectType) will log a message with LL_UsingDisposedObject.
Gets the result of the last convert call of the part instance ids conversion.
An Uint32Array representing the geometric instance ids is returned if the PartInstanceConverterInterface
has finished computing.
Use addEventListener on the event PartInstanceConverterReady to
know when the PartInstanceConverterInterface is ready.
DO NOT modify this data in place, this results in undefined behavior.
geometric instance ids,
result of the conversion, or undefined if the converter had an error, or is still computing.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the convert call of the PartInstanceConverterInterface.
The last error message (if any, or an empty string if no error occurred).
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 the PartInstanceConverterInterface has been cancelled.
This is generally the case after calling cancel when the PartInstanceConverterInterface is retrieving data.
true if the PartInstanceConverterInterface is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the PartInstanceConverterInterface is converting data.
This is the case after calling convert.
true if the PartInstanceConverterInterface is converting.
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.
true if the callback was removed else false.
The listener function that gets removed.
The listener object that was used when addEventListener was called.
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.
true if the callback was removed else false.
The listener function that gets removed.
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.
The PartInstanceConverterInterface interface is used to get, from a list of
part instance ids, the correspondinggeometric instance ids.Contrary to the GeometricInstanceConverterInterface, this operation is not dependant on a filtering context.
This conversion may be useful to change the display on some
part instances, from a search query for example , since the InfiniteEngineInterface works ongeometric instance ids.The PartInstanceConverterInterface interfaces are created through the createPartInstanceConverter method.
The list of signals the PartInstanceConverterInterface may trigger is available in the PartInstanceConverterInterfaceSignal enumeration.
The conversion mechanism is triggered through the convert method. The result is not available right away, but the event PartInstanceConverterReady is triggered when the result of the PartInstanceConverterInterfaceSignal is available. The result is available through the getGeometricInstanceIds function.
Warning : there may be cases when the getGeometricInstanceIds is not available such as when the PartInstanceConverterInterface is fetching data, i.e. when isRunning returns true, or when the PartInstanceConverterInterface has been cancelled, i.e. when isCancelled returns true.
A PartInstanceConverterInterface may be interrupted (cancelled) when the PartInstanceConverterInterface is fetching data and cancel is called. In such cases, the PartInstanceConverterCancelled signal is fired, and shortly after, PartInstanceConverterReady signal is fired, but getGeometricInstanceIds will return undefined. Just call convert with another (or the same)
part instance idsto trigger a new retrieval.If you call multiple times convert before receiving the PartInstanceConverterReady, only one PartInstanceConverterReady will be sent with the content of the last call to convert.
This interface performs the opposite operation of the GeometricInstanceConverterInterface interface.
or asynchronously :
Please make sure the destination browser supports promises before using async calls.
See
PartInstanceConverterInterfaceSignal