06-29-2012 11:10 AM
Hello all,
I set up my sub VI icon and conenctions. I want to use it in my main VI. However when I click select VI and click on my sub VI it doesnt drag/copy the sub VI into my main VI. The only solution is I open the actual folder where the sub VI is and drag it from there but It is not very convenient to open the folder and drag it each time since some of my files are in a lib file. Has anyone experience this before ?
Thanks
07-01-2012
12:27 AM
- last edited on
11-12-2024
02:51 PM
by
Content Cleaner
You can easily drag and drop from a VI to another VI's by first selecting an VI icon at top right, then drag it to another VI's block diagram. If you are trying to move to Front Panel, it won't work.
If you use a LabVIEW project, then you can drag and drop from a project tree. Your Lib file can be included into a project too. If you are not using it yet, I strongly recommend you to learn the basic of the project explorer first before any further development. But a project explorer was introduced with LabVIEW 8.x. The following link may help better understand it.
https://www.ni.com/en/shop/labview/the-essentials-of-file-management-with-labview.html
07-01-2012 08:06 AM
Where exactly are you clicking "select VI"? Is it on an empty part of a block diagram, or are you trying to replace an existing VI?
but It is not very convenient to open the folder and drag it each time since some of my files are in a lib file. Has anyone experience this before ?
Do you mean an LLB? If so, stop. Do not use LLBs to store VIs as part of the development process. Use project libraries. LLBs should only be used for distribution. If a single VI gets corrupted in your LLB, then the entire LLB is corrupted. LLBs also make it more difficult to perform revision control. Which you are using, right? Right?
07-01-2012 10:56 AM - edited 07-01-2012 11:00 AM
You can easily drag and drop from a VI to another VI's by first selecting an VI icon at top right, then drag it to another VI's block diagram. If you are trying to move to Front Panel, it won't work.
Thanks, Now I use it as a solution. I was trying to right click on the empty part on the block diagram and double click the file i want but It doesnt work. So, the only way It now works is that I drag from the icon. Also, I will stop using LLBs. And switch to project files as recommended. Thanks
07-01-2012 11:27 AM - edited 07-01-2012 11:28 AM
@kurabiye wrote:
I was trying to right click on the empty part on the block diagram and double click the file i want but It doesnt work.
I still want to know what you are actually doing. Can you provide more details on the "doesn't work" part, that's a very vague description.
07-01-2012 11:32 AM
doesnt work=when I double click nothing happens, it doesnt copy the VI as a sub VI in the current VI, I behaves like I havent done anything at all
07-01-2012 11:40 AM
@kurabiye wrote:
doesnt work=when I double click nothing happens, it doesnt copy the VI as a sub VI in the current VI, I behaves like I havent done anything at all
... and the same procedure works with any other VI. Is this correct? It only fails on this very specific VI?
07-01-2012 11:44 AM
No does the same thing for every VI. But when I drag it from the icon, it works perfectly.
07-01-2012 12:11 PM
@kurabiye wrote:
No does the same thing for every VI. But when I drag it from the icon, it works perfectly.
OK, this is a more interesting problem. Why did you lead us into the jungle with all these seemingly irrelevant details of your first post? If it never works, don't specifically mention a VI you have made yourself! 😮
Did it ever work before? Does it work on other computers?
(In older LabVIEW versions you were also allowed to drag directly from the file dialog to the diagram, but this is no longer allowed. Since you say "double-click", this does not seem to apply here).
Did you try simple things, such as restarting the computer or repairing the LabVIEW installation? Are you running any unusual antivirus or security software?
07-02-2012 02:11 PM
Hi,
Sorry for the unnecessary details, I was thinking it might be related with some sub VI I have created rather than a general issue but seems like It is more interesting than that. I have tried it in another computer and double click on the selected file (after I right click on an empty space in the block diagram) doesnt work either. I think I will just drag the Sub VI icons to the main VI and live with that.
Thanks