Hi David,
You can write your wolfram language code in a wl file and run it with wolframscript, as in
wolframscript -file Desktop/test.wl
, where I am placing my test.wl file in the Desktop folder.
In this test.wl, you can use the wolfram language functionality related to modelling, as you desire.
You can, for instance, use SystemModelSimulate to run your simulations
(see documentation here). Then, you can store whichever results you want in an array and export it as a csv with
Export["myresults.csv", results, "CSV"]
You can also indicate a full path for the destination of the file. Unfortunately, I cannot see the link you mention, but a simple example of the content of the wl file could be
model = "Modelica.Electrical.Analog.Examples.Rectifier";
sim = SystemModelSimulate[model, <|"ParameterValues"->{"Vknee"->Range[10,90,10],"f"->Range[51,59]}|>];
results = Through[sim["iAC[1]", 0.01]];
Export["myresults.csv", results, "CSV"]
Here, we run a simulation for each pair of values of two parameters of a model for a rectifier. Then ask for the value of a variable (a current, in this case), at time 0.01. Those values are then exported. I hope this helps.