Jump to content
Michael Aivaliotis

VI Scripting - Before 8.6

Recommended Posts

The LabVIEW scripting Forum is a place to discuss and investigate ways of using LabVIEW to programmatically generate LabVIEW code. In other words you can write a VI that will (when executed) create another VI. You may have seen some of this functionality in use already. NI uses this capability internally in some of their code generation tools. For example, if you right-click on a DaQmx task node you can select an option that builds a code example or a configuration VI. This wizard uses special undocumented features of LabVIEW to do this.

VI scripting is a powerful new LabVIEW feature based on existing VI Server technology. Using the scripting API, you can create new VIs, create new front panel and block diagram objects, modify existing front panel and block diagram objects, or inspect existing front panel and block diagram objects. VI scripting allows you to write a VI to programmatically accomplish almost anything you could accomplish in LabVIEW's interactive editor.

VI scripting is not advertised or available in the LabVIEW help files that are distributed with LabVIEW. This could be for many reasons. Some of these are:

- NI has not finalized the implementation.

- The implementation is hard to use and NI wants to make it user friendly.

- NI has not decided to make it a publicly available product.

- The existing implementation contains many bugs.

- NI does not want to burden the support system with issues related to an unreleased product.

Because of the previous statements, you are on your own:

DO NOT contact NI for support on VI Scripting.

DO NOT use these features for released code or applications to your customers.

DO NOT count on the implementation to stay the same for future releases of LV. It will change and your code will not be upgradable.

And Finally-->

Your computer will explode, you will lose all your valuable data and local law enforcement will come knocking on your door.

So BE WARNED! Do not blame NI or anyone here at the LAVA Forums for any problems that may arise from using these features.

The Details:

VI Scripting is exposed to you via methods and properties. To enable these methods and properties, you must add the following line to your labview.ini file. This file is located at:

C:\Program Files\National Instruments\LabVIEW 7.1\labview.ini

Add the following line:

SuperPrivateScriptingFeatureVisible=True

After you restart LabVIEW, place a property node down and click on the various properties. You will notice more items in your list.

post-2-1109304295.gif?width=400

One more thing. To expose the "create object" primitives shown below, you must install VIPM and install the package called: ogmnu_appcontrol_plus

post-2-1109304543.gif?width=400

*Update*

Others have also had success with the following ini entries (don't know what they do):

SuperSecretPrivateSpecialStuff=True

*Update*

Adam Rofer has made some interesting discoveries on some scripting related information. He calls them XNodes.

Good work Adam. :thumbup:

Here is the website: http://xnodes.lavag.org

Share this post


Link to post
Share on other sites

*Update*

Others have also had success with the following ini entries (don't know what they do):

SuperSecretPrivateSpecialStuff=True

It adds properties and methods to the LabVIEW VI server hierarchy, mostly application related and presumably project and other such stuff, that NI considers to dangerous, untested, or giving to deep insight into LabVIEW. It is related to scripting but not the same thing.

Rolf Kalbermatter

Share this post


Link to post
Share on other sites

It adds properties and methods to the LabVIEW VI server hierarchy, mostly application related and presumably project and other such stuff, that NI considers to dangerous, untested, or giving to deep insight into LabVIEW. It is related to scripting but not the same thing.

Rolf Kalbermatter

I thought you all were joking about the:

SuperPrivateScriptingFeatureVisible=True

Based on this does mean that opening a file by double-clicking on it while your main app is open... is not possible?

Cheers,

Battler.

Share this post


Link to post
Share on other sites

Editing thie Labview.ini file doesn't seem to be working for me (I'm not seeing the private methods for the block diagram.) Is there anything else I need to do to enable VI scripting?

Using Labview 8.6, edited the "C:\Program Files\National Instruments\LabVIEW 8.6\LabVIEW.ini"

Addtionally I've tried to enforce launching using that ini file (it should be the default anyway...)

from command Prompt:

G:\>"%ProgramFiles%\National Instruments\LabVIEW 8.6\LabVIEW.exe" -pref "%CURRENTDIR%\BPR 2-12-2010.ini"

Are there any Labview.ini preferences that would conflict with this one? I've edited that file a number of times in the past.

~Jon

Attached Labview.ini file (renamed labview.txt)

LabVIEW.txt

Share this post


Link to post
Share on other sites

Thanks, installed activated and working properly.

~Jon

Cool! Welcome to the club!

I strongly suggest you join the LabVIEW API group on NI community (if you haven't yet), it's full of interesting discussions, ideas and examples.

Have fun.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.