Can I make the Smath Studio as an engine at back?

Can I make the Smath Studio as an engine at back? - Messages

#1 Posted: 5/19/2022 10:33:16 AM
John

John

0 likes in 12 posts.

Group: User

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
#2 Posted: 5/19/2022 1:44:09 PM
Arie

Arie

93 likes in 285 posts.

Group: User

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.

Untitled.png
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#3 Posted: 5/19/2022 2:34:59 PM
Arie

Arie

93 likes in 285 posts.

Group: User

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:

input.png

I have attached the .txt, .sm and .pdf files as well.
calc.pdf (21 KiB) downloaded 38 time(s).
calc.sm (3 KiB) downloaded 33 time(s).
input.txt (8 B) downloaded 35 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#4 Posted: 5/19/2022 2:57:14 PM
Arie

Arie

93 likes in 285 posts.

Group: User

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.

Untitled.png

calc.sm (3 KiB) downloaded 24 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#5 Posted: 5/19/2022 4:39:24 PM
Arie

Arie

93 likes in 285 posts.

Group: User

Wrote

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.
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
#6 Posted: 5/19/2022 10:25:41 PM
John

John

0 likes in 12 posts.

Group: User

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
  • New Posts New Posts
  • No New Posts No New Posts