In the past I was using mdi -c python to test stuff locally.
As I didn't recall having errors, I assumed import aview_main should have worked somehow.
But as I tested it with 2014.0.1 and 2015.1.2, I found Kent is right: It's not working to simply enter "import aview_main".
Seems I had something like this in the code I tested at that time:
if __name__ != '__main__':
import aview_main
else:
class aview_main:
def evaluate_exp(exp): print exp; return exp
def execute_cmd (cmd): print cmd
evaluate_exp = staticmethod(evaluate_exp)
execute_cmd = staticmethod(execute_cmd)
Anyway: There are cases where we'd want to run it that way.
So what about starting the AMD in background without a GUI to make "import Adams" work ?
In the old C-SDK you did quite exactly the same (i.e. C program could be started standalone and inside the code you could build an ADAMS model and run it)
In the past I was using mdi -c python to test stuff locally.
As I didn't recall having errors, I assumed import aview_main should have worked somehow.
But as I tested it with 2014.0.1 and 2015.1.2, I found Kent is right: It's not working to simply enter "import aview_main".
Seems I had something like this in the code I tested at that time:
if __name__ != '__main__':
import aview_main
else:
class aview_main:
def evaluate_exp(exp): print exp; return exp
def execute_cmd (cmd): print cmd
evaluate_exp = staticmethod(evaluate_exp)
execute_cmd = staticmethod(execute_cmd)
Anyway: There are cases where we'd want to run it that way.
So what about starting the AMD in background without a GUI to make "import Adams" work ?
In the old C-SDK you did quite exactly the same (i.e. C program could be started standalone and inside the code you could build an ADAMS model and run it)