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.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Group

Model Selection
Description

Creates a new connection inside the API to an RT-LAB model. Subsequent API calls refer to this model.

If connected to a different model, that connection is broken, and a connection is made to a new instance of the Controller.

If the API is already connected to a different model, that connection is closed and a new connection is created to the specified model.



Note: This function is deprecated. Use OpenProject instead.


Required Control

None
Usage

(instanceId,) = RtlabApi.SetCurrentModel (modelPathNameExt)

Input
  • modelPathNameExt: Absolute path, file name and extension of the model.

Output

  • instanceId: See Glossary.
Exception
  • EOK: Success.
  • ENOENT: No such file or directory.
  • EBADF: Bad file name or path (contains a space character or exceeds 31 characters).
  • EINVAL: Model path and name not specified.
  • EIO: Error sending the request or receiving the reply.
  • EBUSY: New model requested while some clients are still connected.
  • OP_API_EBAD_CONFIG: IP address of the controller machine not specified (environment variable OPAL_META_CTL_IP not set) or error reading configuration file.
  • OP_API_ENO_LICENSE: No license for one or more of RT-LAB components.
  • OP_API_ENO_PRODUCT: No license for RT-LAB and RT-LABx.
ExamplesNone
Related ItemsDisconnect, OP_API_INSTANCE_ID.
Modulesimport RtlabApi
  • No labels