Automate SMath

Automate SMath - Is there a way to automate SMath? - Messages

#1 Posted: 4/27/2019 2:31:46 PM
scudelari

scudelari

0 likes in 6 posts.

Group: User

Hello Everyone,

First of all, congratulations for such an amazing program.

I would like to ask if there is a way to automate SMath through an external code. I would like to, from a C# .Net program:
1- Open a SMath sheet.
2- Change some input variables.
3- Calculate it.
4- Acquire back the value of some variables.
5- Possibly print the sheet to PDF.

Is there, at least, a way to control (i.e. do these things) the program programatically using the plugins? Because if this is possible, then one may create a listener plugin that would expose this functionality to other programs.

Thank you for the assistance.
#2 Posted: 4/28/2019 5:54:25 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

My suggestion is to act like for the Run plugin:

  • Create your SMath worksheet with entry data from files, return data calculated by SS to files;
  • Run the worksheet using command prompt (Process.Start in C#);
  • In the external programs, create and read the input/output files;


Alternatively, you can deal with the xml code of the worksheet like done by ghMath plugin.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#3 Posted: 4/28/2019 6:21:44 AM
scudelari

scudelari

0 likes in 6 posts.

Group: User

Hi Davide,

Thank you so much for that. It was really what I was looking for!

- Rafael
  • New Posts New Posts
  • No New Posts No New Posts