02-24-2020 05:36 AM
Hi guys,
I found how to execute sequence from python via ActiveX object.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019LpMSAU&l=cs-SK
But I would also like to set environment.
Something like /env argument for command line:
https://zone.ni.com/reference/en-XX/help/370052W-01/tsfundamentals/infotopics/startup_opt/
How can I achieve this?
Solved! Go to Solution.
02-24-2020 09:20 AM
Here's an older thread about this that might be useful
It should be a similar process to do the same thing with Python
02-25-2020 04:27 AM
thanks a lot 😀
Now I knew how it works,
but not have a clue how to call this COM object from DLL in python.
02-26-2020 08:18 AM - edited 02-26-2020 08:19 AM
I was able to get it to work by using the CLSID:
import win32com.client
tsEngineInitSettings = win32com.client.Dispatch("{DEF1D36A-327A-487D-876D-816D0D171888}")
tsEngineInitSettings.SetEnvironmentPath("C:\\Users\\Demo\\Desktop\\myEnv.tsenv")
tsEngine = win32com.client.Dispatch("TestStand.Engine")
print(tsEngine.GetEnvironmentPath())