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).
Asynchronously gets the information about the specified part instance ids and their genealogy.
Returns a promise.
Please note that in case of multiple promises running at the same time on the same IdCardGetterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getPartInstanceInfos after awaiting will return the same value.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
part instance ids to fetch metadata from.A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the requested Array
Asynchronously gets the information about the specified part instance id and its genealogy.
Returns a promise.
Please note that in case of multiple promises running at the same time on the same IdCardGetterInterface, the first promises will be signalled as cancelled, the last as ok, but all calls to getPartInstanceInfos after awaiting will return the same value.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
A promise. The promise is resolved with the reason (success, cancelled, disposed, bad input). In case of success, the promise contains the requested Array
Cancels the computation of the metadata retrieving process (if any).
A IdCardGetterInterfaceSignal.IdCardCancelled signal is emitted if the IdCardGetterInterface is retrieving data.
true if the DocumentIdConverterInterface was running, else false.
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.
Tells the type of the given interface.
The type of the given interface.
Gets the last error returned by the update of the IdCardGetterInterface.
The last error if any, or undefined if no error occurred.
Each call to retrieveIdCard is assigned a request id.
This call tels the id of the last call to retrieveIdCard.
The id of the last call to retrieveIdCard.
Gets the result of the metadata request.
The metadata content is returned if the IdCardGetterInterface has finished computing. Use addEventListener on the event IdCardGetterInterfaceSignal.IdCardReady to know when the IdCardGetterInterface is ready.
DO NOT modify this data in place, this results in undefined behavior.
part instance ids and their genealogy (the size of the array is the number of
part instance ids requested (see retrieveIdCard)), or
undefined if the IdCardGetterInterface is computing or if the IdCardGetterInterface is in error or cancelled.Gets the result for the id-card customization script.
As the customization script may change, the customization script types are not exposed to the Infinite api. You can get them from the @3djuump.com/client-script-3djuump-infinite package.
/**
// created previously
let lIdCardGetterInterface : IdCardGetterInterface;
// ...
// ...
const lMultiHierarchy : Array
<br>
The detailed usage of the customization script is beyond the scope of this documentation.
true if the conversion went right.
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 IdCardGetterInterface has been cancelled.
This is generally the case after calling cancel when the IdCardGetterInterface is retrieving data.
true if the IdCardGetterInterface is cancelled.
Tells if this object has been gotten rid off.
true if dispose has been called on this object.
Tells if the IdCardGetterInterface is updating.
This is the case after calling retrieveIdCard.
true if the IdCardGetterInterface is updating.
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.
Gets the information about the specified part instance ids and their genealogy.
The IdCardGetterInterfaceSignal.IdCardReady signal is fired when the
part instance ids metadata result is ready.
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to
get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty
or at least one element is out of range [1 : 2^31-1].
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
part instance ids to fetch metadata from.true if the retrieval procedure has begun.
Gets the information about the specified part instance id and its genealogy.
The event IdCardGetterInterfaceSignal.IdCardReady is fired when the
part instance id metadata result is ready.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to
get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty
or at least one element is out of range [1 - 2^31-1].
part instance id to fetch metadata from.true if the retrieval procedure has begun.
Gets the information about the specified part instance id and its genealogy.
The event IdCardGetterInterfaceSignal.IdCardReady is fired when the
part instance id metadata result is ready.
If pWorkingSet is modified during the execution, then the call is cancelled (see cancel).
Returns true if the metadata procedure retrieval is started. If not, just call getLastError to
get the reason why the procedure failed. For instance, pPartInstanceIds is considered as invalid input if it is empty
or at least one element is out of range [1 - 2^31-1].
true if the retrieval procedure has begun.
The IdCardGetterInterface interface is used to retrieve information about a
part instance(and not ageometric instance id), such as the metadata of thepart, link, the list ofpart instanceancestors, attached document, ....The
metadata documentsand general information can be retrieved by knowing thepart instanceto retrieve. If such a document is requested after a picking, then the givengeometric instance idmust be converted to apart instance id.The IdCardGetterInterface interfaces are created through the DataSessionInterface.createIdCardGetter method.
The list of signals the IdCardGetterInterface may trigger is available in the IdCardGetterInterfaceSignal enumeration.
The metadata retrieval procedure is triggered through the retrieveIdCard methods. The result is not available right away, but the event IdCardGetterInterfaceSignal.IdCardReady is triggered when the result of the IdCardGetterInterface is available. The result is available through the getPartInstanceInfos function.
Warning : there may be cases when the getPartInstanceInfos is not available such as when the IdCardGetterInterface is updating, i.e. when isRunning returns true, or when the IdCardGetterInterface has been cancelled, i.e. when isCancelled returns true.
An IdCardGetterInterface may be interrupted (cancelled) when the IdCardGetterInterface is updating and cancel is called. In such cases, the IdCardGetterInterfaceSignal.IdCardCancelled signal is fired, and shortly after, IdCardGetterInterfaceSignal.IdCardReady signal is fired, but getPartInstanceInfos will return undefined. Just call retrieveIdCard with another (or the same)
part instance idsto trigger a new retrieval.If you call multiple times retrieveIdCard before receiving the IdCardGetterInterfaceSignal.IdCardReady, only one IdCardGetterInterfaceSignal.IdCardReady will be sent with the content of the last call to retrieveIdCard.
The developer may process the results of an id card retrieval with the following code :
or with async calls :
Please make sure the destination browser supports promises before using async calls.
See