/*
@Node Header
@Next Macro

Code:       lin2d.rexx
Author:     Russell Leighton
Revision:   16 Feb 1994

Comments:

Invoke  linear  solver  on current model.  The model is automatically saved
and  processed  through the solver then reloaded into Ami2D.  No model file
is saved or overwritten.

@EndNode
@Node Macro
*/

address command
if ~show('ports', "LIN2D") then do
    'run ami2d:bin/lin2d'
    'waitforport LIN2D'
end

address ami2d 'clear'
address ami2d 'save(ram:temp.dat)'

address lin2d

'read(ram:temp.dat)'
address command 'delete ram:temp.dat'
'formkf(0)'
'solve(0)'
'save(ram:temp.dat)'
'stop'

address ami2d 

'read(ram:temp.dat)'
'find'

address command 'delete ram:temp.dat'
exit
