I am comfortable creating and saving my models within SystemModeler.
I'd like to load my saved model (/home/cjpembo/Documents/SimpleFourBarLinkage.mo) into Mathematica. I've tried the following:
Needs["WSMLink`"];
myModel = WSMSimulate[
SystemOpen["/home/cjpembo/Documents/SimpleFourBarLinkage.mo"]];
This will launch SystemModeler and load my saved model within that external program, but Mathematica is not yet ready to access my model. It returns the following:
WSMSimulate[Null]
I must run the command a second time, now using the model name only:
WSMSimulate["SimpleFourBarLinkage"]
I can now fully access my model from within Mathematica.
I'm certain there is a simple way to accomplish this... but the documentation seems to only address loading models that are already included as examples in SystemModeler, or models that are already loaded in a running SystemModeler session.
So to be more clear: I want to open a saved model from within Mathematica without having to load it twice; just like in the example documentation.
Thanks!