I have some popup VIs that can be called by the main VI's menu as well as from the popups themselves. These VIs are not dropped inside any VI, but are called dynamically using their path - either absolute or relative to the caller. My problem is, I do not know where the VIs might be placed at the time of the Build.
Without going too deeply into the dirty laundry and politics of our company, the project was divided into 2 parts. One part is concerned with retrieving and writing data to a database (my part). This requires user interaction. My contribution is integrated into a legacy application "owned" by another person. That person controls the main VI as well as the Build and distribution. Unfortunately, he operates autonomously and without communication. Bottom line is I have no idea where he will place the VIs for the build and he may change the location at any future build.
I cannot use the Get VI Dependency method because the popups are called dynamically and therefore do not exist on any block diagram. Is there any way to retrieve these paths within an executable at runtime?
Yes, I know the answer is to work as a team, but that is not going to happen...
I have a vi, where after closing the file there is a check if some parameter has changed, so that the filename should be changed accordingly.
What is done is simply create a new path with the current parameters, and check this path with the original path of the saved file. If both paths are identical, nothing is done. If the paths are different then the file is renamed with the "Move" VI.
The vi works as expected most of the time, but where the executable is installed by a customer, error 10 is returned occasionally.
I do not understand how this can happen: if the path is duplicated then the result of the comparison should avoid the file name change.
In case that another file with the same name already existed, the returned error would then be different.
Any hints of what could be happening are welcome.
I hope you can help me with my problem.
The problem that I want to solve (in a proper way) is the following:
I have a list of all the *.dat files in a folder. I want this list to update every time a new *.dat file i created in that folder.
I don't want to pool the folder constantly so I have solved this problem by using a dynamic event from a .NET action. This is all nice and great.
My problem is, that if I change the folder, my dynamic event does not execute when a new file is added to the new folder.
I have attached two snippets of the main part of the code.
In the mainVI, I first setup some events. The events are then written to a global variable. It is this global that I use when broadcasting the event.
In the watch_dir.VI the .NET event is setup. I look for files that are created, deleted, changed or renamed. (Most of the code is from Steve Chandler's nugget: http://forums.ni.com/t5/LabVIEW/My-First-Nugget-Directory-Changed-Event/m-p/1407552)
I have tried initializing the different events when the folder is changed,but that does not seem to fix the problem. I hope I have made myself clear, but please dont hesitate in asking questions.
I could off course just pool the number of files in the folder or something like that, but that doesn't seem right to me.
I hope you can help me.
I've been doing some tinkering and can't seem to find a nice solution to this problem. Does anyone know of a way you can select multiple files from a path control? I know this can be done with the File Dialog Express VI, but I'd like to do it more gracefully from the front panel control. I don't think it's possible, but maybe someone here has some neat trick.
Alternately, is there any way to capture the drag event from multiple files dragged from Windows? I know a single file dragged into a File Path Control will populate it with the correct path, but maybe there's a way to drag multiple files onto an array of paths or something.