Hello,
I can open a 20-sim model from a script matlab file with xxsimOpenModel function if the model is located in C: and in the folder didacted for scripting.
But, I didn't manage to open a 20-sim model with scripting if my file is on another harddrive like Z:.
Here the function I use :
xxsimOpenModel( 'Z:\1_Recherche\1_Modèles et simulations\1_Modèles\2_étude BG\6_Folder\3D\1_En cours\Etude énergétique\Filename.emx' );
I have also defined this path in matlab.
Do you have some ideas so as to I can launch with scripting a model which is not located in C: ? Is it possible ? If yes, is there a special process to do this ?
It is probably me who doesn't apply the good method for the moment
Thank you for your help.
Opening a 20-sim model (.emx) stored not in C with scripting
Moderators: Frank, paul, Hiwot, Chris, peter
-
- Posts: 49
- Joined: Thu Mar 07, 2013 10:10 am
Re: Opening a 20-sim model (.emx) stored not in C with scrip
Can you tell me what kind of network drive you are using? Is it a DFS or NFS share, etc?
Perhaps it works if you first remember the directory with a pwd, then cd to the directory where the model is, open the model without the path, and cd back to the original directory.
Perhaps it works if you first remember the directory with a pwd, then cd to the directory where the model is, open the model without the path, and cd back to the original directory.
member 20-sim development team
-
- Posts: 49
- Joined: Thu Mar 07, 2013 10:10 am
Re: Opening a 20-sim model (.emx) stored not in C with scrip
Hello Paul,
Thank you for your help.
I could have started my matlab script for a folder different from the 20simscripting folder thanks to you tips.
Here you can find the matlab code :
The error I made was the fact that I had some word with accent or space in the path where my script was located.
Thank you for your help.
I could have started my matlab script for a folder different from the 20simscripting folder thanks to you tips.
Here you can find the matlab code :
Code: Select all
scriptpath = pwd;
addpath(genpath(scriptpath));
workingpath= fullfile('C:','Users', 'Benjamin','20simscripting','library');
cd(workingpath);
addpath(genpath(workingpath));
... matlab script ...
modelfile = fullfile(scriptpath,'essai.emx');
xxsimOpenModel(modelfile);
xxsimProcessModel();
cd(scriptpath);