Jump to content

[Discuss] LVOOP Custom User Scripting

Recommended Posts


Name: LVOOP Custom User Scripting

Submitter: jgcode

Submitted: 16 Nov 2009

File Updated: 03 Jan 2011

Category: *Uncertified*

LabVIEW Version: 2009

License Type: BSD (Most common)

LVOOP Custom User Scripting v1.1.1-1

Copyright © 2009, Jonathon Green; JGCODE

All rights reserved.

Author: Jonathon Green

LAVA Name: jgcode

Contact Info: Contact via PM on lavag.org

LabVIEW Versions:

LabVIEW 2009


No Dependencies


Contains Custom User Scripting Hook VIs which are called at the end of their respective scripting processes e.g. New>>VI for Data Member Access...

New scripting includes:


- BD control labels to left

- BD indicators labels to right

- BD controls moved closer to case structure's left hand side border after label repositioned

- Case structure expanded downwards and free label placed under error wire with default "Comment"

- FP controls (excluding owning class or error in) labels bolded to match required parameter on connector pane

Array and MultiDim Array Only

- Index/Indices control moved outside case structure inline with other controls

- Data Member control and Index/Indices control switched on connector pane

- Index/Indices control set as required parameter on connector pane

- FP reflects new connector pane order

Other features includes:

- Default save name for Write Method changed from "Write " to "set"

- Default save name for Read Method = "Read " to "get"

Hooks are installed in the (LabVIEW 2009)\resource\Framework\Providers\LVClassLibrary\NewAccessors directory

This package installs the following hooks:-

Scalar Data Member - BaseAccessorScripter\Custom User Scripting For New Simple Accessor VI.vi

1D Array Data Member - ArrayElementScripter\Custom User Scripting For New Array Element Accessor VI.vi

2D+ Array Data Member - MultiDimArrElemScripter\Custom User Scripting For New MultiDim Array Element Accessor VI.vi

See here for more information

All existing hooks will first be moved to a persistant folder (\addons\_JGCODE Toolkits\lvoop custom user scripting\NewAccessors Original).

The packaged hooks will then be installed.

If the packaged scripting does not match your style then they may server as a useful example.

Installation and instructions:

Install the package using VIPM.

At unistall, the packaged hooks will be unistalled and replaced by the original hooks.


Open Examples\Test.lvclass

Right click on the Test.lvclass and select New>>VI for Data Member Access...

Select a read and write template for Simple, Array and MultiDim Array .

Inspect the FP and BD of the new VIs created to see the additional scripting.

Save the Simple write method to see the new default save name of "setSimple.vi".

Save the Simple read method to see the new default save name of "getSimple.vi".

Known Issues:

All - If a template name already exists LabVIEW will change it to a default. This will usually occur for arrays where the data member name is not used, but rather the element name of an array.

Array (Read/Write) - Comment is sitting on Index Control's wire

Read - Index control not in line with Index Array function

MultiDim Array (Write) Indicies control not in line with Index Array function


Stephen Mercer (AQ)


ICON Technologies

François Normandin

Version History (Changelist):

1.1.1-1 2009 12 22

[New] Renamed packaged, designated old package as conflict

[New] Updated .zip name to include LabVEIW Version (LAVA CR Certified requirement).

[New] Dependencies included in package

[Fix] Removed CLSUIP_LocalizedStrings.vi so as not to distribute NI VIs (LAVA CR Certified requirement).

[Fix] Changed nameing convention to retain capitalisation.

1.1-1 2009 11 27

[New] Added support for when "Include Error Handling Terminals" is unselected

[New] Default save names included. Write: set; Read: get (where is the Data Member Name in camel notation)

[Fix] VIPC file now does not contain packages, it is a list only

[Fix] Removed Quick Drop dependency

1.0-2 2009 11 17

[New] Added VIPC file for dependencies

1.0-1 2009 11 17

[New] Initial release of the code (LabVIEW 2009).




If you have any problems with this code or want to suggest features:

please go to lavag.org and Navigate to LAVA > Resources > Code Repository (Certified) and search for the LVOOP Custom User Scripting support page.


This code was downloaded from the LAVA Code Repository found at lavag.org

Click here to download this file

Link to post

Here is a visual comparison of the scripting. It may not be everyone's cup of tea but it may serve as a good starting point (or may not!! :))

Original Simple Write vs New Simple Write


Original Simple Read vs New Simple Read


Original Array Write vs New Array Write


Original Array Read vs New Array Read


Original MultiDim Write vs New MultiDim Write


Original MultiDim Read vs New MultiDim Read


This release ties up my previous posts of the individual VIs onto a single package.

LVOOP Custom User Scripting For New Simple Accessor VI

LVOOP Custom User Scripting For New Array Element Accessor VI

LVOOP Custom User Scripting For New MultiDim Array Element Accessor VI

Of course none of this changes the functionality much, so it's a nice to do. It's just that it's my preferred style. And if I now don't have to do any work to get this effect than that is great!



Link to post

jgcode: Does your customized version handle the new options in LV 2009 to not include the error terminals and case structure?

Hello AQ (thanks for putting the hooks in 2009 by the way :beer_mug: )

Yes it does! and no it doesn't. :P

I didn't add support, but running the scripts tidies up the BD Labels but its not switching the connector pane for the arrays (obviously where its erroring out in the code).

Due to the style I use, I always have error in/out. But thats a great point and something I will add for the next release. I guess I should just check for error in / out terminals to determine type of template?? Is there a better way? Is that aa flag that is available somewhere? Are you able to comment on how you would support this?

Cheers for the feedback!


Edited by jgcode
Link to post
  • 2 weeks later...

I have now added support for when "Include Error Handling Terminals" is unselected and included my preferred default save names e.g. set<DataMemberName> (in camel notation). The VIPC file is now a list so the download is back to being small as well.


This was a bit of a code and fix job, as I was exploring scripting and try things out. Everything works nonetheless so I figured it was worth posting. However, I plan on refactoring the code in order to neaten it up for the next release and have a few other ideas too.

Anyone got any feedback or suggestions?

They would be much appreciated.



Link to post
  • 4 weeks later...

Can you please explain to me why there are two CLSUIP_LocalizedStrings.vi? (one in LVClassLibrary and one in LVClassLibrary\NewAccessors). What is the difference between these two?

Hi Neil

Thanks for the feedback.

I meant to take this VI out of the package as I did not want to distribute NI VIs when I want to submit it for certification.

Therefore use the one under NewAccessors not mine (mine is getting installed in the wrong spot anyway!).

I use the default VI form NI as the hooks automatically change the name to the get/set.

Its a bug that it is still in there.

I will do a fix tonight at home and load a new version with readme.



Link to post

Can you please explain to me why there are two CLSUIP_LocalizedStrings.vi? (one in LVClassLibrary and one in LVClassLibrary\NewAccessors). What is the difference between these two?

Hi Neil

I have made the fix to the package and uploaded it.

Attached is my CLSUIP_LocalizedStrings.vi file if you want to look at it.


[LabVIEW 9.0]

Link to post

ok, got it sorted... not sure what I was doing wrong! I dont think it installed correctly, but after manually coping the hook VI it worked ok.

Everything works as expected. Don't know why I expected the Class terminal to be bolded, only the actual inputs.

I made a small mod to your VI, I removed the automatic setting of camelCase in the hook VI, now it uses the Localised Strings as I want it to.

Thanks for posting your code!


Your welcome.

You should NOT have to do any manual coping!!

The package installed the required files.

I tested it at home last night and work this morning and it seems ok

Would you mind uninstalling/installing to confirm?

Additionally are you able to post how you used the CLSUIP_LocalizedStrings.vi in your code?

I wasn't able to use it as the global variable is accessesed scope as private?



Link to post

no joy with uninstalling.

Hi Neil

In order to refresh everything:

  1. Uninstall the package using VIPM.
  2. The package backs up the original hooks to the <vi.lib>\addons\_JGCODE Toolkits\lvoop custom user scripting folder under the NewAccessors Original sub-folder. Delete the above lvoop custom user scripting folder (if it exists).
  3. Copy the attached files to their respective locations in <LabVIEW>\resource\Framework\Providers\LVClassLibrary\NewAccessors . These are the original (empty) hooks that come with LabVIEW (ensure they are not read only).
  4. Everything should now be back to default.
  5. Ensuring you have the latest package
  6. Install the package using VIPM.
  7. Test an example class.

Please let me know how you go.



NewAccessors Original.zip

[LabVIEW 2009]

Link to post

Join the conversation

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

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.