Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Add support for loading local gridlabd.glm as default model #1211

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion source/cmdarg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,12 @@ STATUS GldCmdarg::no_cmdargs(void)
{
char guiname[1024] = "gridlabd-editor.py";
char guipath[1024];
if ( find_file(guiname,NULL,R_OK,guipath,sizeof(guipath)) )
char glmpath[1024];
if ( find_file("gridlabd.glm",".",R_OK,glmpath,sizeof(glmpath)) )
{
return loadall(glmpath);
}
else if ( find_file(guiname,NULL,R_OK,guipath,sizeof(guipath)) )
{
char command[2048];
snprintf(command,sizeof(command)-1,"%s/python3 %s &",global_bindir,guipath);
Expand Down