cancel
Showing results for 
Search instead for 
Did you mean: 
1 Reply

Re: Get variables from external process only with dos batch file ?

You can definitely do it with more than just DOS. I dont use C# but I do a bit with Python.  If you can share what you have done would be happy to try and look at it and recommend a change. However, it also depends on WHAT variables are you trying to update in Core? I may have some similar examples if you can describe which variables.  Typically the variable have to be updated in a very specific file and then passed back into Core in a specific location $FFout$. 

Most often I use .bat files to call the external scripts - you can pass variables through the script to your secondary script. Then save the 'variables' file to a specific location to have them go back into Core. Some variables Core will not let you update. 

So, high level description - when using the external component, the default variables are $FFin$ and $FFout$.  So at the $FFin$ location should be 2 files. A PDF file and an .xpf file. The .xpf file has the variables.  So your application needs to UPDATE the .xpf file and use the same name, but then copy it to the $FFout$ path when finished.  But as I said, not all variables can be updated. There are a few that can be updated without issue.

Please describe your needs.

0 Kudos
pmaze
FreeFlow User

Get variables from external process only with dos batch file ?

Hello,

I want to use a C# program to retrieve external variables. You can do much more than dos program such as getting part of PDF, put text in variables and so on.

Based on bat file where it sets environment variables linked to FFSetvariables.txt file, I have developed the same in c#.

With System.Environment.SetEnvironmentVariable("$FFTestVariables$", "\"Nouvelle_valeur\"", EnvironmentVariableTarget.User); I set the new external value (the original value comes from the csv file).

The Target.User means we collect the variables on the user level (try also with process level).

I can see this variable set on cmd window.

But nothing changes on FFCore output !

I conclude you can only manage variables with dos file, that makes no sense on ASP.Net application !

So, does anybody experiment other way than dos ?

If necessary, I can join the cs source file and my ffc export file. 

0 Kudos