1 страниц (6 вхождений)
Can I make the Smath Studio as an engine at back? - Сообщения
#1 Опубликовано: 19.05.2022 10:33:16
Hi
Is it possible to pack the smath studio in my software as a calculation engine at background? transfer my parameter into the sheet? produce the pdf of result?
thanks a lot!
John
Is it possible to pack the smath studio in my software as a calculation engine at background? transfer my parameter into the sheet? produce the pdf of result?
thanks a lot!
John
#2 Опубликовано: 19.05.2022 13:44:09
I know it's possible to run Smath from the command line and save as a specific output. What I am not sure about is whether or not you can pass parameters into the sheet using -o.
If you look in the reference book under Program Operation -> Silent Mode and Command Line Options you will get more info.

If you look in the reference book under Program Operation -> Silent Mode and Command Line Options you will get more info.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#3 Опубликовано: 19.05.2022 14:34:59
So I was able to do this in a couple steps.
I put my inputs into a file called "input.txt". Then I created a .sm called "calc.sm" that read input from the input.txt file and performed a calculation.
The command line looked like this:

I have attached the .txt, .sm and .pdf files as well.
calc.pdf (21 КиБ) скачан 38 раз(а).
calc.sm (3 КиБ) скачан 33 раз(а).
input.txt (8 Б) скачан 35 раз(а).
I put my inputs into a file called "input.txt". Then I created a .sm called "calc.sm" that read input from the input.txt file and performed a calculation.
The command line looked like this:
I have attached the .txt, .sm and .pdf files as well.
calc.pdf (21 КиБ) скачан 38 раз(а).
calc.sm (3 КиБ) скачан 33 раз(а).
input.txt (8 Б) скачан 35 раз(а).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 Опубликовано: 19.05.2022 14:57:14
Perhaps improving on this concept a bit. I've added some commands to point the current working directory to the document directory. This way you can save the input.txt and calc.sm in the same folder. That way you could call:
SmathStudio_Desktop.exe -silent pathtosmfile -e pdf
and as long as the input file is in the same folder you don't have to point to the absolute path of the file. This makes it more portable.

calc.sm (3 КиБ) скачан 24 раз(а).
SmathStudio_Desktop.exe -silent pathtosmfile -e pdf
and as long as the input file is in the same folder you don't have to point to the absolute path of the file. This makes it more portable.
calc.sm (3 КиБ) скачан 24 раз(а).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#5 Опубликовано: 19.05.2022 16:39:24
WroteHi
Is it possible to pack the smath studio in my software as a calculation engine at background? transfer my parameter into the sheet? produce the pdf of result?
thanks a lot!
John
Re-reading this, yes it is possible, however, if your software is intended to be distributed, you must be careful how you package this as to not violate the license agreement. Only unmodified installer may be redistributed.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
1 страниц (6 вхождений)
-
Новые сообщения
-
Нет новых сообщений