08-30-2018 07:32 AM
Hi all,
I'm developing a steptype which parses an Excel speadsheet to build dynamicaly a sequencefile
After Sequencefile generation, I'd like to execute this sequencefile.
For that, i'm using API functions "NewExecution" and "WaitForEndEx". And it's working.
But with this approach, runtime variables are not shared between sequence caller and called sequencefile.
I'd prefer to use the same "Execution" context instead of creating a new one.
In this case, I could used runtime variables in the generated sequencefile.
But I don't know how I can do...
Thanks in advance for your help
09-01-2018
03:43 PM
- last edited on
11-01-2024
07:06 PM
by
Content Cleaner
I think there are two important questions to consider here:
Either should be possible. For 1, you could just specify the generated sequence file by expression in a sequence call step from your generator sequence. For 2, you could use ThisContext.NewExecution instead of Engine.NewExecution and give it some sequenceArgs. I attached a modified version of this shipping example that does this - check out the "Execute New Sequence" step close to the end.
Hope this helps!
Trent
09-03-2018 10:10 AM
Thanks for your answer.
Finally, I choose the solution 1.
I make a new StepType (from NI SequenceCall Type). In pre step, I call the .NET code which parse Excel file and build SequenceFile.
Then the step calls the generated sequence file.
But another issue, the step tries loading generated sequence file before calling pre step which generates this file.
So I need to do with other solution.
Do you have an idea?
Thanks again for your help
09-04-2018 03:34 AM
I'm continuing working on this issue.
And at the same time, I've discovered sequence file translator feature.
I think it could be the best solution.
I tried to build example with VS2017 and I get error : "error MSB6006: Arrêt de "CL.exe" avec le code -1073741515.". Any idea about this error?
I saw 3 kinds of possible dev plateform (CVI, VS C++ and LV). Would it be possible to make a translator in .NET?
Many questions but I just enter in the TS world and I have to develop advanced features in the same time.
Thanks in advance for your help.
09-04-2018 10:34 AM
Good news. I managed to develop a translator for my custom file format (excel).
I export .NET functions in a COM object, I developed a native DLL which use this COM object.
Now, TS editor can open my excel file like a sequence editor and I can use Sequence Call steptype (passing this excel file)
I'm a newbie but I start liking TS programming 😉
09-04-2018
12:51 PM
- last edited on
11-01-2024
07:07 PM
by
Content Cleaner
Nice! To make sure i understand correctly, when you say translator - you mean a sequence file translator, right?
-Trent
09-04-2018 01:30 PM
Yes that 's it.
I didn't know this feature before today.