SMath Studio Forum
»
SMath Studio
»
Questions
»
Can I make the Smath Studio as an engine at back?
Rank: Member Groups: Registered
Joined: 01/01/2022(UTC) Posts: 12
|
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
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
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. |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
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 (22kb) downloaded 19 time(s). calc.sm (4kb) downloaded 15 time(s). input.txt (1kb) downloaded 18 time(s). |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
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 (4kb) downloaded 6 time(s). |
|
|
|
|
Rank: Advanced Member Groups: Registered
Joined: 23/03/2016(UTC) Posts: 276 Was thanked: 91 time(s) in 57 post(s)
|
Originally Posted by: johnpan 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 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. |
|
|
|
|
Rank: Member Groups: Registered
Joined: 01/01/2022(UTC) Posts: 12
|
Hi, alyles
thank you for the detail and sample. good idea for me.
Yes, I'm care about the software license. thank you for the notice.
BR
John
|
|
|
|
SMath Studio Forum
»
SMath Studio
»
Questions
»
Can I make the Smath Studio as an engine at back?
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.