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 Preparation


Start the compilation steps, which separate the subsystems, generate the code and compile each subsystem.

This function enables you to specify:

  • options by subsystem

  • option in the array will be read, and this option will be applied to each subsystem

  • If you want to compile all subsystems with the same options, you must specify only one subsystem with an empty string for the subsystem
    name. Example: RtlabApi.StartCompile2( ( (““,options), ) )

Compilation continues after this function has returned with a return code of EOK. You must call DisplayInformation to get the compilation results and the compilation termination status.

You may call AbortCompile during the operation to stop the model's compilation. You must call RegisterDisplay to register to receive status and compilation messages.

Required Control

System Control


subsystemInfo1 = (subsystemName1, subsystemOptions1)

subsystemInfo2 = (subsystemName2, subsystemOptions2)


compilationInfo = ( subsystemInfo1, subsystemInfo2, ...)

RtlabApi.StartCompile2 (compilationInfo)


  • subsystemName: Subsystem name.

  • subsystemOptions: Indicates which step of the compilation is to be completed. See OP_COMPILATION_DEFINE.




  • EOK: Command successfully issued (See Description for more information).

  • OP_API_ESEPARATION: Error while separating the model's subsystems.

  • OP_API_ECODE_GENERATION: Error while generating code for the subsystems.

  • EPERM: System control was not granted to this client.

  • EBUSY: Model executables already loaded.

  • EBADF: Model not specified by previous Connect or OpenProject.

  • EIO: Error sending the request or receiving the reply.

  • OP_API_ENO_PRODUCT: No license for RT-LAB and RT-LABx.

  • OP_API_ENO_DEVELOP_LICENSE: No development license available.

  • OP_API_ENO_TARGET_LICENSE: No license for the selected target.



Related Items

AbortCompile, DisplayInformation, OP_COMPILATION_DEFINE.


import RtlabApi

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