We have many API scripts and we would like to find a way to be able to launch them indifferently from indisde FEMAP (via the Custom Tools) or outside FEMAP (from Excel or an outside code, such as external optimization loops).
The problem is that when launched in FEMAP, the user manually inputs certain paramters through GUIs, however when launched from outside FEMAP, in loops, we would like to be able to pass parameters to the macro automatically (withouth GUIs or user intervention, rather through an initial option file)
How can we achieve this double way of functionning?
If we stick to VB6 it seems the MacroRun and the "Command$" functions could do the job. However passing arguments as a string seems tedious (is there no way to pass arrays as arguments?), and in the end we would rather use a more recent code like .NET.
If we go with .NET I have not found a way to pass parameters automatically to the .exe. Is it feasable?
I initially thought the same principle than VB6 would apply: my .exe is stored somewhere, and the small bit of code called by the Custom Tools is simply a "MacroRun "path\myExe.exe" ".
However this returns an error saying there are syntax errors.
In the end our main objective is to avoid having 2 codes doing the same thing, one for when we launch from FEMAP and the other for when we launch in "automatic" mode from outside FEMAP.
Any ideas or tips on the subject would be greatly appreciated!