NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

PostUIMessageEx Python

Hi,

 

How to  access the TestStand ActiveX API from python,

I'm getting an error when using PostUIMessageEx 

 

1.

def callby(seq_context):
seq_context.Thread.PostUIMessageEx(10000, 0.0, "Hello", None , False);
2.
def callby(seq_context):
Ref = win32com.client.Dispatch("TestStand.Engine.1")
Ref.LoadTypePaletteFilesEx (ConflictHandler_Prompt, 0)
SeqFile = Ref.GetSequenceFileEx("C:\\Production\\TF_Yogi\\Sequence\\TF_Yogi.seq")
MainSEQ_ref = SeqFile.GetSequenceByName("MainSequence")
MainSEQ_ref.Thread.PostUIMessageEx(10000, 0.0, "Hello", null, True);
Ref.ReleaseSequenceFileEx(SeqFile)

0 Kudos
Message 1 of 2
(559 Views)

Solved :

def callby(seq_context):
seq_context.RunState.Thread.PostUIMessageEx(10000, 0.0, "Hello from the other site", seq_context, False);

 

image001.png

0 Kudos
Message 2 of 2
(497 Views)