Rank: Newbie
Groups: Registered
Joined: 22/11/2016(UTC) Posts: 2
|
День добрый! Написал некий алгоритм на SMath Studio. Какие есть способы доступа к нему из внешней программы? Например дать на вход данные, а после расчета получить данные на выходе.
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,654 Location: Italy Was thanked: 1340 time(s) in 879 post(s)
|
|
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 03/03/2014(UTC) Posts: 418 Was thanked: 125 time(s) in 96 post(s)
|
Originally Posted by: Davide Carpi ALso would like to point out that as far as I know you cannot call Smath execution from any external software. Best you can do is Smath inputs to external & Smath retrieves from external, not the other way around. Edited by user 24 November 2016 00:52:51(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 22/11/2016(UTC) Posts: 2
|
For example MathCad and Delphi MathCad code (here is the algorithm) Quote: A:=Re(in0) B:=Re(in1) C:=A+B out0:=C
Delphi code (enter an input and get the output data) Quote:procedure TForm1.Button1Click(Sender: TObject); begin with OleContainer1 do begin x1:=StrToInt(Edit1.text); y1:=StrToInt(Edit1.text); Run; OleObject.SetComplex('in0', x1, 0); OleObject.SetComplex('in1', y1, 0); OleObject.Recalculate; z2:=OleObject.GetComplex('out0', out_data, out_Buf); label1.Caption:=IntToStr(z2); end; end; How to do this with SMath? Edited by user 24 November 2016 20:28:14(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 10/11/2010(UTC) Posts: 1,495 Was thanked: 1275 time(s) in 746 post(s)
|
Это невозможно сделать, используя SMath Studio (автоматизация не поддерживается). Но вы можете задать файл с данными и выполнить расчётный файл без запуска интерфейса. Выходные переменные нужно также записать в виде файла. Импорт и экспорт можно делать различными способами. Где-то была тема с ключами SMath Studio, в которой Андрей показывал как вычислить sm-файл без запуска интерфейса. П.С. Дэвид написал дополнение Run, которое использует эти ключи ( silent и test) для вычисления документа. Edited by user 24 November 2016 20:44:46(UTC)
| Reason: Not specified |
Russia ☭ forever Viacheslav N. Mezentsev |
1 user thanked uni for this useful post.
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.