OpenModelica


Forgot password? | Forgot username? | Register

User Interface to load a String

User Interface to load a String

Hello everybody,

I would like to use an User Interface to load the path of a file in the variables of my program. To give you an idea of what I am looking for, the equivalent function in Matlab would be "uigetfile". Do you know if a such Library exists under OpenModelica?

Thank you by advance for your help!  current/smile

William

Administrator has disabled public posting. Please login or register in order to proceed.

Re: User Interface to load a String

For OpenModelica scripting: https://openmodelica.org/doc/OpenModeli … l#loadfile
For OMEdit: no

Administrator has disabled public posting. Please login or register in order to proceed.

Re: User Interface to load a String

Hello sjoelund.se,

Thank you for your quick reply. I don't really understand, what is OpenModelica Scripting? Indeed, I do not manage to run the OpenModelica.Scripting.loadFile(...) function in OMedit.

What I do:

class test
import OpenModelica.Scripting.loadFile;
Boolean loadFileErrorFlag;
String pathname = "rabbit.mo";
algorithm
loadFileErrorFlag := loadFile(fileName= pathname);
end test;

What I get:
https://www.openmodelica.org/images/agorapro/attachments/6364/mini_CompilerMessageScreenshot.PNG

Best regards

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic
You are here: