Find by command line (.m script) the Source File for a loaded model
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Radu Dan
am 18 Jan. 2018
Kommentiert: Radu Dan
am 19 Jan. 2018
Hello, Is it anybody that could help me to find how to read by command line (.m script) the Source File for a loaded model? This model property can be found in the Model Properties, under Main tab in Model information. I cannot use:
info = Simulink.MDLInfo(ModelName);
as I have two distinct projects with identical structure and filenames. I am also changing often between projects and I need to find which model is currently opened. Thanks in advance!
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 18 Jan. 2018
bdroot(gcs) or bdroot(gcb) might be what you need.
3 Kommentare
Fangjun Jiang
am 19 Jan. 2018
Bearbeitet: Fangjun Jiang
am 19 Jan. 2018
okay, that will be get_param(bdroot,'Filename')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Create Large-Scale Model Components finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!