The following is a summary of the scripting functions available in MATLAB through the ArtisynthHandle object:
Returns the ArtiSynth Main object.
Loads the named model along with optional arguments. name is the classname of the model’s RootModel and args... is an optional variable-length list of string arguments that are used to form the args argument of the model’s build() method. Nominally, name should be a fully-qualified classname (e.g., artisynth.demos.mech.RigidBodyDemo), but if the model has been loaded before, the simple class name should work as well (e.g., RigidBodyDemo).
Loads a model from an ArtiSynth file. filename is a string giving the file’s path.
Save a model to an ArtiSynth file.
Save a model to an ArtiSynth file. The options saveWayPointData and coreCompsOnly specify whether to (a) save waypoint data, and (b) save only components from artisynth_core.
Starts the simulation running.
Starts and runs the simulation for t seconds.
Pauses the simulation.
Starts a single simulation step.
Starts a single simulation step and waits for it to complete.
Resets the simulation to time 0.
Forwards the simulation to the next waypoint.
Rewinds the simulation to the last waypoint.
Delays execution for t seconds. In MATLAB, the same effect can be achieved using the MATLAB command pause(t).
Blocks until the simulation has completed.
Returns true if simulation is still running.
Returns current ArtiSynth simulation time in seconds.
Reloads the current model.
Adds a simulation waypoint at time t, where t is a floating point value giving the time in seconds.
Adds a breakpoint at time t.
Removes any waypoint or breakpoint at time t.
Removes all waypoints and breakpoints.
Save waypoints and their data to a specified file
Load waypoints and their data from a specified file
Returns the current RootModel.
Finds a component defined by path with respect to the current RootModel.
Returns the current ArtiSynth selection list.
Returns the i-th selection list item (1-based for MATLAB).
Quits ArtiSynth.