Opens Open a project from its settings file or |
connects connect to an active project. This command is a wrapped version of Command which has the fixed ownerId OP_RTLAB_OBJ and OP_COMMAND CMD_OPEN. |
Required Control | None |
---|
Usage | projectId = RtlabApi.OpenProject (project=””, functionalBlock=None, controlPriority=OP_CTRL_PRIO_NORMAL, returnOnAmbiguity=False) |
---|
project = string or intfunctionalBlock = OP_FUNCTIONAL_BLOCK
controlPriority = OP_CONTROL_PRIORITY
returnOnAmbiguity = bool |
Input | project {str/int} : Full or partial match of a project filename or instance ID of an active project. If this argument is omitted and only one active project exists, a connection is established with this project. If this argument describes more than one of the active projects, a dialog will be displayed to choose the desired project. Use returnOnAmbiguity to disable this dialog. functionalBlock: Functional block to control upon connection to an active project. By default, no control is requested. cf. OP_FUNCTIONAL_BLOCK. controlPriority: Priority with which to take control of the requested functional block. By default, normal priority is used. cf. OP_CONTROL_PRIORITY. returnOnAmbiguity {bool}: Disables the dialog that allows the user to select among several active projects that partially match the project criterion. Instead of displaying dialog, E2BIG exception is thrown.
|
---|
Output | |
---|
Exception | EOK: success. ENOMEM: Insufficient memory. EINVAL: Invalid arguments specified. E2BIG: More than one possible match for project criterion in active projects. EIO: Error sending the request or receiving the reply. OP_API_ECREATE_SHMEM: Error creating project selection shared memory block. OP_API_ECREATE_PROCESS: Error creating the project selection process. OP_API_CMD_CANCELED: Project selection was cancelled by the user.
|
---|
Examples | projectId = RtlabApi.OpenProject('%RTLAB_ROOT%/Examples/Basic/rtdemo1/Simulink/rtdemo1') |
---|
Related Items | Command, OP_COMMAND, OP_FUNCTIONAL_BLOCK, OP_CONTROL_PRIORITY. |
---|
Modules | import RtlabApi |
---|