LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create case with vi:s from folder

Solved!
Go to solution

I want to create a case with n number of sub vi inside. I have a folder containing n number of vi:s, they all have the same inputs and outputs.

My problem is that I dont know how many there is and I want to be able to open a specific one depending on its name in a string, send in some parameters and get some back.

 

Is there any way to create a case on startupp that has as many frames as there are vi:s in the folder, give the case frame the name of the vi, add the vi icon in the case and connect the wires to it. Or is this possible to do in an outher way? Calling it some way?

/Richard

0 Kudos
Message 1 of 6
(3,980 Views)
Solution
Accepted by topic author Mirodan

You cannot dynamically create cases but as long as the name of the VI can be gotten from the string, there is no need to. You can dynamically call a VI. There are shipping examples that demonstrate this Dynamic Load Example, Plug In Example, etc).

 

Also, you cannot link to an image that is located on your local drive. You have to attach it to your post first and then you can link to that.

0 Kudos
Message 2 of 6
(3,975 Views)

Your picture did not come through.  You need to attach your image to your message.  As it is, the link to the image is pointing to your hard drive, which for obvious reasons we don't have access to.

 

1.  Attach image to message.

2.  Post message.

3.  Edit message.

4.  Insert image using link as it points to the NI webserver.

5.  Post message again.

0 Kudos
Message 3 of 6
(3,972 Views)

Your picture links to a document on your computer, so we cannot see it. If you want to post an image you need to add it as an attachment.

 

In terms of your question, there are 2 solutions that I can think of right off the top of my head:

  1. Use the VI Server to launch the VI. The VI Server can be used to pass parameters to the VI and get values back. You would have no case structure.
  2. Use scripting to generate your case. This would require a scripting license if you're using LabVIEW 8.x. Also, scripting is beyond the scope of these forums. If you want to learn more you can head over to LAVA
EDIT: 3 answers within a few minutes of each other. Everybody's awake this morning! Smiley Very Happy
Message Edited by smercurio_fc on 10-13-2008 09:32 AM
0 Kudos
Message 4 of 6
(3,969 Views)

smercurio_fc wrote:
  1. Use scripting to generate your case. This would require a scripting license if you're using LabVIEW 8.x. Also, scripting is beyond the scope of these forums. If you want to learn more you can head over to LAVA

Just want to clarify before people start calling NI about it. There is no such thing as a scripting license. This product does not exist, so let's all please stop talking about this imaginary license. Scripting is an internal feature of LabVIEW reserved for internal use only and NI does not want people to use it. NI makes it difficult for anyone to use and access. This is done on purpose. The only way to get access to it is to hack LabVIEW. Some have managed to do this and have posted their findings and experiments on LAVA. Using scripting techniques is totally unsupported by NI.

 

On the other hand, it's a great tool for doing some amazingly cool stuff in LabVIEW.



Michael Aivaliotis
VI Shots LLC
Message 5 of 6
(3,926 Views)

Michael Aivaliotis wrote:

Just want to clarify before people start calling NI about it. There is no such thing as a scripting license. This product does not exist, so let's all please stop talking about this imaginary license.


I was basing that on the information when 8.0 first came out, and it was actually based on several posts that I read over at LAVA. Of course, they may have been based on incorrect information from the start. Or perhaps it changed along the way. Don't really know since I stopped following scripting once 8.0 came out.

0 Kudos
Message 6 of 6
(3,923 Views)