LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CantankerousBullMoose

Respect Conditional Disable Structures when Loading VIs

Status: New

I've got some calls to low level VIs that rely on windows system dlls within a larger top level VI. To make that application work on Windows and Linux, I've put conditional disable structures around the dll calls. When I open the top level VI in Linux, I have to click through a bunch of "Find missing file" dialogs for the Windows system dlls. If I cancel through all the dialogs, the VI still compiles and runs correctly in Linux, so the Conditional Disable structures are doing most of what they should, but the dialogs are annoying and can cause problems with automated builds and other hands-off activities. Since the code is inside a conditional disable structure, it seems to me that LabVIEW has all the information in needs to know it shouldn't load that stuff, so it would be great to get rid of these nuisance dialogs.

10 Comments
elset191
Active Participant

I run into this also when loading code that runs on a cRIO in a Windows environment.

--
Tim Elsey
Certified LabVIEW Architect
AristosQueue (NI)
NI Employee (retired)

You write your code on platform A, but on that platform you write for A and B. When you load on B, if stuff for A is missing, how can LabVIEW tell whether that is because it is intentionally missing because you are using LV as a deployment environment or if it shouldn't be missing because you're actually doing more edits on B and you need to keep links to A correct?

 

In short, I don't think LabVIEW has enough info to tell the difference between a nuisance and a significant problem.

 

Is there a way you can suggest for us to differentiate these cases?

 

As far as interrupting dialogs... if you're doing programmatic loading, you can tell the Open VI Reference node to not search and not prompt for missing items. If you're opening directly in the editor, you should have Ignore All button so you should only have one missing dialog to dismiss (though I admit the search may take a while for each one to conclude it really is missing -- that can be annoying).

Intaris
Proven Zealot

When loading code, first check the conditional disable cases and load only those which apply.  In the IDE, only show the current case.  If the user changes the view of the conditional disable (selects A on Target B), load the contents at that point in time.  Any missing items will then be searched for.  Proper user interaction ensues.

 

If I never "look" at A when on Target B, LV can feel free to ignore it.

CantankerousBullMoose
Member

I guess maybe this request is specific to creating compiled artifacts like with the Application builder (I don't do much with FPGAs, but maybe that also falls into this category?).  AristosQueue has a point; I use a Source Distribution build to package up my code and move it to a linux environment, and I would certainly want that to find dependencies inside Conditional Disable structures.

 

Maybe if there was a way to set Ignore All as the default behavior when building executables and shared libraries? 

littlesphaeroid
Active Participant

I see this also with normal disable structures. If the code is disabled, then why are we looking for those VIs?

_____________
Creator of the BundleMagic plugin for LabVIEW!
AristosQueue (NI)
NI Employee (retired)

littlesphaeroid I don't know what conditions you're talking about specifically, but if you're talking about in the editor environment, we load all the dependencies if you open the block diagram because we a) need to draw the icons and b) need to be able to draw the wire coming out of those nodes. For both of those, we need the subVI to get its icon and connector pane. We also load the diagram if the VI needs to recompile. It won't load if it is already recompiled.

littlesphaeroid
Active Participant

Yes, this makes sense. I had assumed that commented -out code would have some sort of placeholder graphics and would not be required to load in the editor environment. This obviously is not the case! Thanks for the clarification.

_____________
Creator of the BundleMagic plugin for LabVIEW!
Thomas_robertson
Active Participant

+1 This also causes us problems.  When we load our code on MacOS it starts prompting us to find windows specific vi.lib files and we have to ignore.  Ignoring jams up our automated builders. 

wiebe@CARYA
Knight of NI

Isn't the some key to ignore all loading errors (I know there is, just don't have it ready).

 

That key will give other problems, but might solve the CI problems with this.

AristosQueue (NI)
NI Employee (retired)

@Thomas_robertson LV R&D does a lot of that kind of building (our entire system loads on multiple platforms, and we have several places where we use conditional disable structs to choose which subVIs to load). We do not experience the problems you are describing. I do not know how your system differs from ours, but programmatic loads don't prompt you to find missing subVIs unless you deliberately pass 0x10 to the Open VI Reference. You may wish to pass 0x20 to suppress the load dialogs entirely. Discussing your build system with other developers may also be beneficial.

 

@CantankerousBullMoose What I just typed above to Thomas is the same thing that confuses me about your idea overall. You are complaining that the "find subVI dialogs" interfere with your automated builds. But automated builds don't throw those dialogs unless you ask them to. How are you even seeing this situation?

 

Also, when you are manually loading, does the Ignore All button not work? You mention having to cancel multiple dialogs when you load a VI. I tested it with a VI that calls three different DLLs. When all of those DLLs are missing, I can hit Ignore All on the first dialog, and that's the only one I get.

 

I think we need more details about the situations that you all are in before we could act on this idea. As far as I can tell, LV is already handling these situations correctly with minimal impact on users, which means I'm clearly not looking at the scenarios that are bothering you. 🙂 Please reply with explicit details behaviors you want changed and whether those behaviors are during a manual load or during a programmatic load.