So, I really like @Dancergraham suggestion, and it nearly works, but…
This is what I’m trying to implement…
This is the command alias…
!_-runpythonscript “import AllySections as AS;AS.FlatBar()”
And this is the error message…
This script works as expected, either through the alias or in the script editor, if I call the function specifically in the AllySection.py file (if name==“main”:…etc) , so the AllySection.ini is able to be located otherwise.
The reload suggestion resulted in the same error message as above where it couldn’t find the ini.
Then I run a previously functional alias…
Command: na12PL
Command: _-runpythonscript
Python Script <import AllySections;reload(AllySections);AllySections.FlatBar() “make12PL.py”
Please select surfaces to make 12PL:
So it works, but the command line shows feedback of the previous runpythonscript alias…weird, but I don’t think that is the problem.
I have a feeling this is a problem with GetSettings. It can’t be a problem with the Alias code because all the other aliases can find their .py files in the same location as the .ini file.
Thank you @Dancergraham, this is it. We got there eventually and this was an education for me.
This is the command alias…
!_-runpythonscript “import AllySections as AS;AS.FlatBar()”
Options -> Files -> Search Paths -> add the same search path as was added in the Python Editor to enable the python script aliases from a common directory.
There is no need to save the ini file anywhere else, just keep it in the common directory with the custom python files. Black highlighted search paths are the same.