Skip to main content
Skip table of contents

importProject

Import a Monolix or a PKanalix project into the currently running application initialized in the connectors.
The extensions are .mlxtran for Monolix, .pkx for PKanalix, .smlx for Simulx and .dxp for Datxplore.
WARNING: R is sensitive between '\' and '/', only '/' can be used. Allowed import sources are:

CURRENT SOFTWAREALLOWED IMPORTS
MonolixPKanalix
PKanalixMonolix, Datxplore
SimulxMonolix, PKanalix.

Usage

R
importProject(projectFile)

Arguments

projectFile

(character) Path to the project file. Can be absolute or relative to the current working directory.

Details

At import, a new project is created in a temporary folder with a project setting filesNextToProject = TRUE, which means that file dependencies such as data and model files are copied and kept next to the new project (or in the result folder for Simulx). This new project can be saved to the desired location withsaveProject.

Simulx projects can only be exported, not imported. To export a Simulx project to another application, please load the Simulx project with the Simulx connectors and use exportProject.

Importing a Monolix or a PKanalix project into Simulx automatically creates elements that can be used for simulation, exactly as in the GUI.

To see which elements of some type have been created in the new project, you can use the get..Element functions: getOccasionElements, getPopulationElements, getPopulationElements, getIndividualElements, getCovariateElements, getTreatmentElements, getOutputElements, getRegressorElements.

Examples

R
if (FALSE) {
initializeLixoftConnectors(software = "simulx", force = TRUE)
importProject("/path/to/project/file.mlxtran") 
importProject("/path/to/project/file.pkx") 

initializeLixoftConnectors(software = "monolix", force = TRUE)
importProject("/path/to/project/file.pkx") 

initializeLixoftConnectors(software = "pkanalix", force = TRUE)
importProject("/path/to/project/file.mlxtran") 
}

# working example to import a Monolix demo project into Simulx. The resulting .smlx file can be opened from Simulx GUI.

initializeLixoftConnectors(software = "monolix", force = TRUE)
MonolixDemoPath = file.path(getDemoPath(),"1.creating_and_using_models","1.1.libraries_of_models","warfarinPK_project.mlxtran")
initializeLixoftConnectors(software = "simulx", force = TRUE)
importProject(MonolixDemoPath)
saveProject("importFromMonolix.smlx")


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.