- Index
- » Developer
- » OpenModelica development
- » User Interface to load a String
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!
William
Re: User Interface to load a String
- sjoelund.se
- 1700 Posts
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:
Best regards
- Index
- » Developer
- » OpenModelica development
- » User Interface to load a String