From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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
(569 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
(507 Views)