Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.



Model selection


Return an opaque handle associated with a new connection, which becomes the current connection. The new connection is uninitialized, and its state is the same as for a new process or thread.

This handle can be passed back to a subsequent SetConnHandle. This call is only required when a thread must handle multiple connections. There is no need to call this function when a thread handles only one connection. There is no harm in doing so, as long as it is the first call made to RT-LAB API done by that thread. Changing this connection (e.g. by calling Connect or OpenProject) does not change the other connections, whereas one of those calls without first calling NewConnHandle implicitly disconnects a previously existing connection.

Required Control

System control


handle = RtlabApi.NewConnHandle()




  • handle: handle of the new connection


  • EOK: success.

  • ENOMEM: memory allocation error.

  • E2BIG: too many open connections for this process.


See multi_models

Related Items

GetConnHandle, SetConnHandle, DeleteConnHandle.


import RtlabApi


OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | | +1 514-935-2323