LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set a methods error out value in an XControl?

I'm working with an XControl and have created several methods.  I can see two possible ways to return status when a method is invoked.  One is by providing an output parameter in the method (this is my fall back).  The other would be to set the error out value of the invoke node from within the facade VI.  Is there a way to do this?
 
From what I've seen in the documentation it appears the facade runs after the method VI, so I don't see how it would be possible to return a value for the method VI to use in it's error out.
0 Kudos
Message 1 of 4
(2,920 Views)
Hi DAD,

It appears that you may be correct in your statement. However, I would like to be certain and see what exactly you are working with in terms of the methods. Would you be able to provide some addtional clarifications? Thanks!

Best regards,

Steven C
0 Kudos
Message 2 of 4
(2,896 Views)

Steven,

In a nutshell, I created an XControl that on the user interface is just a ring control, but always has '<Other...>' as its last option.  If the user selects <Other...> a dialog is presented allowing them to add a new item to the ring.

One of the methods I created is to load the ring strings from an .ini file.  This method has input arguments for the .ini file path and section name.  If there is an I/O error, say the specified .ini file doesn't exist, I was hoping to be able to return error info to the VI invoking the method via the error out on the invoke node.

- DAD

0 Kudos
Message 3 of 4
(2,882 Views)
Hi DAD,

Thank you for this clarification. As you mentioned, since the facade runs after the method VI, you should return the status by providing your output parameter in the method instead. This would probably be the best approach.

Best regards,

Steven
0 Kudos
Message 4 of 4
(2,858 Views)