PostUIMessageEx go c#

Hello

I managed to send my message by sequence of TS PostUIMessageEx and manipulate in my IO.

It is a way to send the same message from PostUIMessageEx of dll c#?

I am trying following but not succseeded

public void UDPConnect (SequenceContext seqContext, out Boolean result, out String reportText, out bool errorOccurred, out int errorCode, out String errorMsg)
{

PropertyObject propertyObject = seqContext.AsPropertyObject ();

Thread.PostUIMessageEx (NationalInstruments.TestStand.Interop.API.UIMessageCodes.UIMsg_UserMessageBase + 3, 0,0, "Hello", propertyObject.GetValInterface ("Locals.Thread", 0), true);

}

Please find attachment.

Thank you very much

Whence the 'thread '? You get the context of the sequence. The wire is an object, you must make the call on that.

Hope this helps,

-Doug

Tags: NI Software

Similar Questions

  • Use PostUIMessageEx to send a data container?

    I figured out how to use PostUIMessageEx, but I wonder if I can use it to send a container of data (Cluster) to LV

    Place the Variable in the activeXDataPAram does not send the ActiveXdata (does not raise an error when I unflatten/cast it is).

    It would be convenient.

    You know, I look for things.  I don't really have.  It is not lightly that I post to ask for help in the forums, especially on Saturday.

    But almost every time I post, I go back and try a last search.  And it's the only one.

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/6233

  • & quot; incorrect function & quot; error on PostUIMessageEx in Labview with the Labview runtime

    Hello

    I have a TestStand GUI developed in c#. Now, TestStand has some modules Labview which must send the UIMessages to the interface graphic (it is too deep in Labview code to bring back to TestStand to send the UIMessage).

    When I use the complete edition LabVIEW 8.6.1 development version, all right, I can see my messages. Now, when I go to run Labview 8.6.1, the node to invoke PostUIMessageEx gives me an error: incorrect function (error 1).

    I have tried restarting PC/TestStand/Labview without success. Is that all that I'm missing?

    Thank you

    Alex


  • User Message interface help - table to send to the user through ActiveX interface

    Hello

    I asked a similar question before, but now I'm having problems trying to get a table in the user interface via the mail user interface. I am my code TestStand, I have an expression to send a picture that is as a container of table of FileGlobal to the UI as such:

    RunState.Thread.PostUIMessageEx (UIMsg_UserMessageBase + 2, 0, "", FileGlobals.DataRead, False)

    and in the UImessage callback I what I thought, I have to do to send the data to an array of text on the user interface. It does not work.

    Can someone tell me what I am doing wrong?

    Is attached, the UIcallback, a picture of the table on my user interface and control


  • User Message message of Labview VI interface running on another thread

    I have a Labview GUI, which displays information on my oven.

    It's the thread that runs on the background it querys my oven, then I save variables stationglobals and then send a message to the user interface. It works very well.

    Now, I made an improved OVEN that not only monitor but also controls the oven. It is written in labview.

    on the above example, I use a statement for the user of Message interface:

    RunState.Thread.PostUIMessageEx (UIMsg_UserMessageBase + 1, 0, "",StationGlobals.ovenDatum, True)

    Where StationGolbals.ovenDatum is a container with the numbers and strings.

    Now on my Labview code

    I already have this wire in labview. So my question is... Can I just wire up my container in the ActiveXdataParameter ovenDatum or what I need to do some sort of conversion. ? I just do it?

    Problem solved after trying and you are looking for a solution...

  • Operator Interface labview and teststand back the call for promotion of status sequential

    Hello

    I am looking for a solution to be able to take by the API Testand 'call sequence' status key of my teststand sequence.

    The idea is to combine, on my operator labview interface a specific indicator pour each call sequence 'important '.

    Example: an indicator to test consumers, another for power supply, an another SoftComm ex but not pour tests under

    The first solution that comes to me and inspired by what I could find on this forum is the utilistion method PostUIMessageEx en post expression for each call sequence don't I want to get the result.

    I find this solution satisfactory sector a bit heavy and a little too dependent on the test sequence she herself.

    Other solutions of would they?

    Please pour your contributions

    Hello

    In general, I get the UIMessage TraceCallback. So based on the name of the step (say consolidated test for example) I can do whatever I want since LabVIEW update my GUI without having to change the TestStand sequences.

    Kind regards

  • E-mail user interface executable back to the file of the sequence

    How can I move a message from the user interface of the executable back to a file of sequence?

    (TS_PropertySetValString) does not seem to work as I want it.  I get an error that the variable in the search string is not recognized.

    any help?

    Thank you

    You should always use PostUIMessageEx.

    As the collar of activeXDataParam ThisContext.  A single word.  ThisContext refers to the current SequenceContext, then you can always be assured that you are referring to the current context.

    Here is an example that shows how the ThisContext: http://zone.ni.com/devzone/cda/epd/p/id/5838

    Instead of him passing as parameter you are passing as a UIMessage.

    Hope this helps,

  • How you see the progression when you use a ForEach loop?

    Hello

    I have a table with about 100 containers in it. My main thread uses a ForEach with an internal structure dealing with six opportunities. My previous program had all the steps in a very long list, run one by one. I find this new approach is much more pleasant to look at and easier to change, but it is not really no way to tell at what point along the test is (unless you know it by heart). In the approach of the long list, you could see all the results/success made and how much remained, now there is no way to tell.

    A few tips to make some sort of indication of progress?

    As ObjectReference parameter, you must use 'nothing '. The last parameter (alternator?), you can choose true or false. Please see the documentation for PostUIMessageEx for more information.

    The numeric parameter should be between 0 and 100. Since this is "Progress per cent", it is logical, it?

    The status bar has several components, one for example display the connected to the user or the used process template. The pane on the right side mostly shows the percentage of progress if used in your sequence.

    Reports by default, again, includes this feature. So if you have a sequence with for example 500 steps, the report "will be a visible progress" in this pane (with less than 100 steps, it's often too fast to see). Do not forget that the sequence editor of NOR and full featured Interfaces have this feature, the chart Simple interface is not.

    Norbert

  • TestStand IO using c# to access sequence variables of

    I have a requirement to display during execution on the IO sequence variables.

    At the c# simple IO example and after reading some help files and docs, I tried two approaches. I failed to go to sequence variables.

    (1) I tried to get a SequenceContext of the ExecutionMgr, but failed with the COM exceptions

    (2) then tried to recover the RuntimeVariables, but even once, it failed with the COM exceptions

    Is not a c# or .net expert I think I have to make a simple mistake.

    Someone out there who has done this in c# and is ready to share?

    I am interested in:

    (1) what is the right way to access the sequence inhabitants.

    (2) what event reminders to use to update GUI with the progress of the execution sequence.

    If no luck I'll publish my code and problems.

    With the help of Teststand 4.1 with the free version of Visual Studio 2008.

    The way focused on events to do this is has your message in sequence by using the method of Thread.PostUIMessageEx of UIMsgs. The messages contain a payload of data of your sequence variables. The IO will have an event handler that receives these messages, and then you add the code in the IO to the data wherever it goes on the front panel of the IO. You must create your own messages defined by the user because TestStand lists a UIMessageCodes block. You can view messages in a code module, a stage of the trial, or use an expression TestStand API.

    TestStand I (or II) course is a good example on how to do it. This seems far-fetched at first, but it's a scalable way to do. It provides a rough synchronization, you get the UIMessages from their publication.

    A cool thing, is: when your IO receives a UIMessage, it can be thread.sequence the message context. So you may send a dummy message, have your event handler to get the context of the message sequence, and you will have access to the local population of sequence and all the rest.

    If you want to have the read IO inhabitants of sequence by another way, I think you'd get an array of all executions that the engine has currently a Manager OI (maybe the engine), then understand that it is yours, then understand this thread in this performance is yours and then the thread and sequence etc.. It is not possible to obtain seq right context of ExecutionMgr. I personally wouldn't do it this way.

    CC

  • Create sequences of the model

    Hi all!

    I develop a test using Teststand 2.0 application (which is required by the customer, so I can't upgrade), I need to create a new sequence or a resulting set of sequnces of the pre written templates.

    Adding a voice in the Tools menu that creates the new sequence from the model would be ok.

    I've searched the forums and I found the thread:

    http://forums.NI.com/NI/board/message?board.ID=330&message.ID=3438&query.ID=305522#M3438

    Here's what I managed to do so far

    (1) I call IEngine.GetSequenceFile () with my career as a model to get the handle to seqfile.

    (2) I use the PropertyObject.Clone () method to duplicate th sequence ad retrerive the new handle.

    (3) I save the new sequence with the SequenceFile.Save method.

    (4) I opened the new sequence in the Editor interface using the Runstate.Thread.PostUIMessageEX function.

    the parameters passed to this appeal are

    eventCode = UIMsg_OpenWindows

    numericDataParam = 0

    stringDataParam = "MainSequence.

    activeXDataParam = Locals.ClonedSeqFile / / this is the handle to the sequence cloned from the model

    improve = false

    with the above code, I can create a new sequence, save it and open it in the editor.

    What I need to do, is open the sequence in the editor WITHOUT saving it, because it is just a new file template (the usere must be invited to a path when recording it).

    If I take the third step of the sequence gives me an error.

    SO the question is is there a way ot create a sequence manage and open it in the editor before saving the file on the disk?

    Thanks in advance!

    Marco

    Maybe I solved the problem: the Runstate.Thread.PostUIMessageEX does not work when activex sequenceFile ref has an empty path, so I can write a temporary path in this field by using the PropertyObjectFile.Path attribute with the handful of cloned sequence.

    To get the temporary path, I get the last used dir (IEngine.FileDialogDirHistoryList) concatenated to a unique file name (I use kernel32.dll to check if the new name exists and that I have change up is a non-existent one).

    I put the new sequence, such as amended (PropertyObjectFile.IncChangeCount ()) and I opened the sequence int the editor.

    now when I press save button I get a prompt asking for the new path of sequence.

    I would like to know if there is a better solution.

    P.S

    the PropertyObjectFile.displayname doesn't seem to work

    Concerning

    Marco

Maybe you are looking for

  • iCloud photo management

    Hello I use an iPhone 6 s. version 9.3.5. Can I delete photos from my iPhone, but keep copies in iCloud? Right now, deleting photos on the phone deletes icloud as well. Thanking you Moorghen

  • HP 3500 pro: VHS TO DVD

    I just bought a VHS to DVD converter (VIDBOX 8.0 DELUXE) and would like to know if I can use my computer for anything else or if I should leave my computer alone when I record from VHS to the DVD recorder.

  • How would you do that? 2 case of a test station

    I have a sequecne that works great stand alone, that now we want to add another test power to the system. It is not as easy as it may seem, here are the conditions and what we intend to do. I need to have either 2 instances of the running program or

  • Windows install me Windows 8.1 won't even if I'm an administrator!

    Hello I went to the store of windows 8 to download the new application windows 8.1. This was going to be downloaded on my new computer windows 8 in which I am an administrator. However, when I clicked on download it says I need to login as an adminis

  • How to fix the HP ePrint message: print path is not yet fully secure

    I have a CM1415nwf and on the Web 'Services Web HP - HP ePrint' settings page, the following note appears near the bottom: NOTE: The print path is not fully secure. HP does not recommend print private or confidential information through ePrint at thi