Skip to content

Commit

Permalink
- Added trunk/Makefile.common, and restructured Makefile and Makefile…
Browse files Browse the repository at this point in the history
….omdev.mingw

- Fixed lots of weird install targets for files
  - Moved commands.xml, etc files from bin to share/omnotebook, share/omshell.
  - Moved ptplot.jar from bin to share/omc/java.
  - Moved ptplot_license.txt from bin to share/
  - Moved omc_helptext.txt from bin to share/doc/omc
  - Added antlr_license.txt
  - Moved OPENMODELICA/include to OPENMODELICAHOME/omc/include
    - This way we won't override system libs/includes if we install to /usr
    - Did the same for /lib
  - Left to do: Move scripts from bin to usr/share/omc/scripts
- Updated OMNotebook and OMShell to reflect new paths of xml files.
- Updated doPlot commands to reflect the new location of ptplot.jar


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk/doc@5368 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 23, 2010
1 parent 46a7725 commit 1aa8bb8
Showing 1 changed file with 118 additions and 0 deletions.
118 changes: 118 additions & 0 deletions omc_helptext.txt
@@ -0,0 +1,118 @@
OpenModelica Builtin Commands
-----------------------------
Exit OMShell by pressing Ctrl-d

up-arrow
Get previously given command.
down-arrow
Get next command.

<tab>
Command completion of these builtin commands.
Circulate through the commands by only using <tab>.

cd()
Return the current directory

cd(dir)
Change directory to the directory given as a string.
Ex: cd("myModels/myLibrary")

clear()
Clear everything.

clearVariables()
Clear the variables.

help()
Print this helptext (returned as a string).

instantiateModel(modelname)
Instantiates a model/class and returns a string
containing the flat class definition.
Ex: instantiateModel(dcmotor)
list()
Return a string containing all class definitions.

list(modelname)
Return a string containing the class definition of
the named class. Ex: list(dcmotor)

listVariables()
Return a vector of the currently defined variable names.

loadFile(strFile)
Load modelica file given as string argument.
Ex: loadFile("../myLibrary/myModels.mo")

loadModel(name)
Load model, function, or package relative to $OPENMODELICALIBRARY.
Ex: loadModel(Modelica.Electrical)
Note: if e.g. loadModel(Modelica) fails, you may have
OPENMODELICALIBRARY pointing at the wrong location.

plot(var)
Plot a variable relative to time from the most recently
simulated model. Ex: plot(x)

plot(vars)
Plot variables given as a vector relative to time from
the most recently simulated model.
Plotting parameters, array elements or record variables not
currently supported.
Ex: plot({x,y})

plotParametric(var1, var2)
Plot var2 relative to var1 from the most recently
simulated model.
Ex: plotParametric(x,y)

readFile(str)
Load file given as string and return a string of the file content.
Ex: readFile("myModel/myModelr.mo")

readSimulationResultSize(strFile)
Return the size of the record resulting from a simulation. The size
is read from the result file, given as a string
Ex: readSimulationResultSize("dcmotor_res.plt");

readSimulationResult(strFile, variables, size)
Read the results of a simulation from a file named by the string
argument strFile. Here size is the size of the resulting record and
variables is a vector of the variables to investigate.
Ex: readSimulationResult("dcmotor_res.plt", {R1.i,L1.v}, 10)

runScript(strFile)
Exectute script file (.mos) given as string argument.
Ex: runScript("simulation.mos")

saveModel(strFile,modelname)
Save the model/class with name modelname in the file given by the
strFile string argument.

simulate(modelname[,startTime=<Real>]
[,stopTime=<Real>][,numberOfIntervals=<Integer>])
Translates a model and simulates it.
Ex: simulate(dcmotor)
Ex: simulate(dcmotor,startTime=0, stopTime=10, numberOfIntervals=1000)

system(str)
Execute str as a system(shell) command, return integer success value.
Ex: system("touch myFile")

timing(expr)
Evaluates expression and returns the number of seconds the evaluation
took. Ex: timing(x*4711+5)

typeOf(variable)
Returns the type of the variable as a string. Ex: typeOf(R1.v)

val(variableName,stime)
The val(variableName,time) scription function retrieves the interpolated
value of a simulation result variable at time=stime of the
simulated time.
Using val on parameters, array elements, or record variables not
currently supported.

quit()
Leave OpenModelica and kill the process.

0 comments on commit 1aa8bb8

Please sign in to comment.