12-09-2023 12:54 AM
Which is not a good setting for an API in LabVIEW.
Solved! Go to Solution.
12-09-2023 02:56 AM
12-09-2023 07:16 AM
@Fresenius_Medical_Care wrote:
Which is not a good setting for an API in LabVIEW.
- Disable automatic error handling,
- disable icon resize for front panel,
- run enabled when open
- OR default window appearance?
So, bullets 1, and 4 are excellent practices for API development and bullet 2 "Should" be pointless. So, I'll ask the hard question.
Why, oh Why would you ever set an API VI to Run when Opened? How would the using developer read the documentation in the FP controls and indicators Tip strips and descriptions? Or the free text usage information if the VI just started executing wherever the user opened the VI FP?
12-09-2023 09:16 AM
I really don't understand the point of your questions without having more background.
Maybe start with defining what you mean by "API", because it seems to conflict with the common definition of the term, then explain what kind of API you are trying to write and its targeted use.
12-09-2023 11:47 AM
12-09-2023 03:05 PM - edited 12-09-2023 03:17 PM
Since Bob Schor will continue to ask how I handle FP vi properties....
Here is a link to a document that once existed in the abandoned FAQ area of the discussion forums. Linked from here
And attached in the original docx which, IIRC, contains an embedded object 2012 snippet of a replacement for TBD Core.vi (the core vi underneath the shipping version of Three Button Dialog.vi) It should have been updated to be a malleable VI and TBD Core.vi obsoleted, but AQ never got around to it.
As a salient point, Three Button Dialog.vi, breaks several best practices for an API VI. Everyone can always learn, grow and improve.
12-09-2023 06:44 PM
Hi Jay,
I was leaning more towards "Disable automatic error handling" as I feel it will make the VI non-responsive if there is an error which will act like a modal VI.
Your point of view make sense, but is "run enabled when opened" same as simply run when open?
I feel it just enables the run icon and doesn't run the VI?
12-09-2023 06:46 PM
Hi Alten bach,
Thats exactly my point.
As Albert responded in his post, this was a question in CLA-R exam which I have unfortunately failed a number of times now.
They didn't provide more info on this.
Given the options which one and why do you feel is the best answer?
12-09-2023 07:40 PM
Hi Gerd,
It will be Error pop-ups 🙂
Then is it disable automatic error handling?
12-10-2023 11:51 AM - edited 12-10-2023 11:59 AM
The wording sounds a bit off but I HATE, and I can't emphasis that enough here, with a passion anyone who tries to set his VI to run when opened. For a function library (or API) that setting makes even less of sense than for other VIs.
point 1 can be useful, your software library should ideally not require the user to debug inside it and all possible errors should be either properly handled or purposefully ignored. I do often use disable error dialogs in VIs, AFTER they have been intensely debugged and tested. The error dialog can be annoying but in a properly developed library there should be no unwired error out in most cases although I can understand that having to connect Clear Error functions to intentionally ignore error outputs can be sometimes annoying.
point 2 sounds to me like a trap, there is no resizable icon in LabVIEW so not sure how you could even disable that.
point 4 is nonsense, your API functions are not supposed to open their front panel at runtime so the window appearance settings are meaningless and should really be left at their default setting, if they are not I would consider it a minor annoyance but it's not a problem either.
Unless you did not choose point 3, this question was not where you went wrong.