simion

DESCRIPTION

The “simion” table contains various functions and objects that allow SIMION to be examined and manipulated from Lua.

In SIMION 8.0, members of this table include various basic functions such for printing to the log window (simion.print) or generating random numbers (simion.rand). Many of these are described in Appendix L “User Programming” of the printed SIMION manual, but a number of additional functions (listed here) have been added since the manual printing.

In SIMION 8.1, the “simion” table is being significantly extended to include various objects that allow, for example, manipulation of potential array objects and instances (PA’s), workbenches (IOB’s), and the SIMION display window.

This module is pre-loaded by default, so you don’t need to reload it yourself.

Note

This page is abridged from the full SIMION "Supplemental Documentation" (Help file). The following additional sections can be found in the full version of this page accessible via the "Help > Supplemental Documentation" menu in SIMION 8.1.1 or above:
  • INTERFACE - Objects

simion.pas

simion.pas is an object that represents a list of all potential arrays (PAs) in memory–that is, the potential array list shown on the SIMION main screen (which is different from the list of PA instances in the PAs tab on the View screen). This allows PAs to be read and manipulated programmatially.

Example:

-- List all PAs in memory.
for i=1,#simion.pas do
  print(simion.pas[i])
end

Note that #simion.pas is the number of PAs in memory, and simion.pas[i] retrieves the i-th PA in memory.

See simion.pas for much more complete details on this interface.

Compatibility Warning: This object is only available in SIMION 8.1.0 and above.

simion.wb

simion.wb

simion.wb is an object that represents the currently loaded SIMION workbench (IOB file). This allows the SIMION workbench to be read and manipulated programmatically. This value is nil if no workbench is currently loaded.

See simion.wb for much more complete details on this interface.

Compatibility Warning: This object is only available in SIMION 8.1.0 and above.

Note

This page is abridged from the full SIMION "Supplemental Documentation" (Help file). The following additional sections can be found in the full version of this page accessible via the "Help > Supplemental Documentation" menu in SIMION 8.1.1 or above:
  • Other

Note

This page is abridged from the full SIMION "Supplemental Documentation" (Help file). The following additional sections can be found in the full version of this page accessible via the "Help > Supplemental Documentation" menu in SIMION 8.1.1 or above:
  • INTERFACE - Functions

SOURCE/History/Changes

  • 2012-08-28: simion.command'name.iob' no longer changes current working directory on .iob file load failure. Improve error strings raised by simion.command'name.iob'