LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change existing terminals from "view as icon" to view as data type through program

Solved!
Go to solution

I got some legacy LabVIEW code from other people. And there are tons of existing terminals displayed as icon. Is there any way to do batch process to change all of them to view as data type?

 

Thanks a lot!

0 Kudos
Message 1 of 10
(4,563 Views)
Solution
Accepted by CA.Lucy

I created a VI that changes all of these.

 

Run this VI.  Go to whatever block diagram you want to turn off the View as Icons setting.  Then click on the button in this VI.

 

I also created version using the Right Click Framework, but I don't have access to the PC that has that code right now.

Message 2 of 10
(4,554 Views)

Here's an RCF plugin for that.  Unzip it into your plugin directory and Bob will be your uncle.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 3 of 10
(4,527 Views)

It works great! Thanks a lot!


@Ravens Fan wrote:

I created a VI that changes all of these.

 

Run this VI.  Go to whatever block diagram you want to turn off the View as Icons setting.  Then click on the button in this VI.

 

I also created version using the Right Click Framework, but I don't have access to the PC that has that code right now.


 

0 Kudos
Message 4 of 10
(4,506 Views)

I notice that both of the solutions are using "ControlTerminal" class, and using IconView from the properity node, however why when I search the class using class brower, I couldn't find this class? Also if I connect a new properity node to the existing class ref output, there is no properity for me to select. Why?

 

BTW, I'm using LabVIEW 2010 SP1.

0 Kudos
Message 5 of 10
(4,470 Views)

I'm not at a PC right now with LabVIEW on it to confirm my answer.  But it uses LabVIEW scripting to programmatically modify LabVIEW code.  If you haven't installed or activated scripting, the proeprty nodes and classes that are associated with it can't be seen.  Those property nodes show up with a light blue top to them.

 

In LabVIEW 2010, you can activate scripting with an option in the options menu.   Enabling VI Scripting

 

Older versions of LabVIEW required an installation and a license code to activate it.  Here is the link for scripting for LV 8.6 and 2009 NI Labs: LabVIEW VI Scripting

0 Kudos
Message 6 of 10
(4,451 Views)

I turn the VI script on. There is no problem in LabVIEW 2010. However when I turn on the VI script under LabVIEW 7.1 (Don't heat me. 😞 ), there is no "IconView?" property. Is it not supported under LabVIEW 7.1?

 

It will be too bad if that's true. My ultimate goal is to change all of the VIs that run under LabVIEW 7.1. And by using LabVIEW2010, I cannot save it back to 7.1 either. Any suggestion?

 

Again, Thanks a looooooooooooooot!

0 Kudos
Message 7 of 10
(4,430 Views)

I don't think LV scripting existed as long ago as LV 7.1.  Actually, it may have, but was unsupported and only available to internal NI people.

 

Scripting was made available for the public around LV 8.6.  It was undocumented, officially unsupported, and use at your own risk.

 

I think with a few successful versions have passed, and seeing the popularity of it and the cool tools people have written by using it, it has become a bit more supported (though I don't know if it is still yet offically supported, and still use at your own risk) and NI made it easier to access and turn on by way of the LV options dialog.

 

Short answer, you're not going to be able to use scripting in LV 7.1  LabVIEW 10 and only save as far back as LV 8.  If you have LV 8, then you can do that final save back to LV 7.1  For all that trouble, you might as well just go around and manually change all your terminals out of icon view in your block diagram.

0 Kudos
Message 8 of 10
(4,422 Views)

Thanks for your quick reply.

I was able to turn on the VI script by adding "SuperPrivateScriptingFeatureVisible=True" in C:\Program Files\National Instruments\LabVIEW 7.1\labview.ini. However as you said, they are not officially supported. And it's version 7.1, so I'm too surprised when I cannot find the "IconView?". As you said, if I don't have LV8, then I will have to manually change everything.

0 Kudos
Message 9 of 10
(4,419 Views)

If you have a VI in 2010, you can save it as far back as 8.0.  There is a thread on this forum dedicated to downconvert requests (and on for upconvert, as well).  So post your VI there, and it will probably be converted quickly.

 

Scripting has existed in LabVIEW since about version 5.1.  It was created to support scripting LabVIEW code in products such as the DAQ Assistant and Motion Assistant.  The first product to use this technology was the Vision Assistant.  However, the early versions are very primitive with limited or no support for common functions (e.g. Delete).  Usually, support was added when it was needed for a project.  Scripting took a huge leap in quality when LabVIEW 7.0 was released, since it is used behind the scenes to generate the code for Express VIs (which were introduced in 7.0).  Scripting steadily improved in quality and features until it was released to general use in LabVIEW 2009.  We are still working to expose all the development time functionality.

 

Take home message is that you can downconvert your VI, but there is no guarantee that the functionality you have in LabVIEW 2010 will exist in 7.1.  While this is true in general, it is especially true of scripting functions.

0 Kudos
Message 10 of 10
(4,387 Views)