Jump to content

[LVTN] Rename LVOOP Labels


jgcode

Recommended Posts

index.php?app=downloads&module=display&section=screenshot&id=103

Name: Rename LVOOP Labels

Submitter: jgcode

Submitted: 28 Nov 2009

File Updated: 30 Jan 2012

Category: LabVIEW Tools Network Certified

LabVIEW Version: 2009

License Type: BSD (Most common)

This package is Open Source

This package is a LAVA distribution - visit 'http://bit.ly/team_lava' to learn more about Team LAVA

Visit 'http://bit.ly/rename_lvoop_labels' for this package's support forum

This package contains a Plugin which renames a Class Member VI's Top Left and Top Right Connector Pane inputs to 'Class Name In' for control and 'Class Name Out' for indicator. Qualified Namespacing is ignored (i.e. parent Libraries). All VI control terminal labels are aligned left and indicator terminal labels right. Addtionally the Class icon will be refreshed. Use this Plugin e.g. after you have renamed a Class and you want to update it's labels or when you have cloned (Save As) a Class

This plugin was designed to be use with 'LVOOP templates' therefore, the following Connector Panes are supported:

4815 - 4x2x2x4

4833 - 5x3x3x5

4834 - 6x4x4x6

4835 - 8x6x6x8

Restart LabVIEW to refresh Menus after installation

Use the Tool Menu or NI Example Finder to view examples of how this tool works.

Tools Menu:

Plugins can be found under Tools>>LAVA>>Rename LVOOP Labels

'Rename Selected VI Only' - operates only on the selected VI

'Rename All VIs In Class' - operates on all VIs in the selected VI's Class

'Open Example' - demonstrates features of this tool

Quick Drop (QD):

Press Ctrl + Space to launch QD

The default hotkey for this plugin is 'Z'

'Ctrl + Z' - operates only on the selected VI

'Ctrl + Shift + Z' - operates on all VIs in the selected VI's Class

Help Menu:

Help can be found under Help>>LAVA>>Rename LVOOP Labels

Installation Locations (relative to LabVIEW directory):

'\vi.lib\addons\_LAVA\rename_lvoop_labels' - main code

'\project\LAVA\rename_lvoop_labels' - tools menu plugin code

'\resource\dialog\QuickDrop\plugins' - quick drop plugin code (z.vi)

'\help\LAVA\rename_lvoop_labels' - help menu plugin code

'\examples\LAVA\rename_lvoop_labels' - example code

'\examples\exbins' - .bin3 file

Click here to download this file

  • Like 1
Link to comment
  • 8 months later...

Jonathon,

I had trouble installing this package using VIPM 2010, and this was probably because the icon.bmp file included in the .ogp file was ReadOnly.

The main problem is within VIPM (AFAIK), but to enable other users to use this Quick Drop Plugin, I just opened your original zip and the included ogp file and removed any ReadOnly flags.

rename_lvoop_fp_object_labels-1.0-1_LV2009.zip

/J

Link to comment

Jonathon,

I had trouble installing this package using VIPM 2010, and this was probably because the icon.bmp file included in the .ogp file was ReadOnly.

The main problem is within VIPM (AFAIK), but to enable other users to use this Quick Drop Plugin, I just opened your original zip and the included ogp file and removed any ReadOnly flags.

rename_lvoop_fp_object_labels-1.0-1_LV2009.zip

/J

Hey Mellroth

I have it installed just fine here?

LV2009, LV2010; Win 7; VIPM 2010.1568

post-10325-061414900 1283326884_thumb.pn

post-10325-013216100 1283327333_thumb.pn

post-10325-074320800 1283327337_thumb.pn

Do you have any more info?

Have you tried multiple PCs?

Also, if you have any feeback for the tool please post?

Cheers

-JG

Link to comment

I filed a bug report for VIPM, see http://forums.jkisoft.com/index.php?showtopic=1465 for more info.

I have tried multiple PC:s, both community edition as well as Pro version of VIPM. Once I edit the ogp file so that icon.bmp is not ReadOnly anymore I can successfully install the package.

Have you installed using VIPM 2010 or VIPM 3.0? I believe that this is a issue only with VIPM 2010.

Regarding feedback, check back later today (its morning here in Sweden) as I have not really started using it yet.

/J

  • Like 1
Link to comment

I filed a bug report for VIPM, see http://forums.jkisof...?showtopic=1465 for more info.

I have tried multiple PC:s, both community edition as well as Pro version of VIPM. Once I edit the ogp file so that icon.bmp is not ReadOnly anymore I can successfully install the package.

Have you installed using VIPM 2010 or VIPM 3.0? I believe that this is a issue only with VIPM 2010.

Regarding feedback, check back later today (its morning here in Sweden) as I have not really started using it yet.

/J

I didn't know this was a cross-post until Jim emailed me just then with the above link.

My screenshots are VIPM 2010 (the Splash Screen gives it away :) )

Please let me know your feedback if you have any.

Cheers for posting

Link to comment

My screenshots are VIPM 2010 (the Splash Screen gives it away :) )

Sorry about the cross-post, originally my post was just about fixing the tool in LAVA CR.

I noticed that you are using VIPM2010, but the tool could have been installed with an earlier version of VIPM (I read a note about how much you just love VIPM3.0 :rolleyes:)

Feedback is coming...

/J

  • Like 1
Link to comment

Sorry about the cross-post, originally my post was just about fixing the tool in LAVA CR.

I noticed that you are using VIPM2010, but the tool could have been installed with an earlier version of VIPM (I read a note about how much you just love VIPM3.0 :rolleyes:)

Feedback is coming...

/J

Haha! I certainly do.

But I have VIPM 2010 @ work - and I did a uninstall / reinstall in LV2009 and LV2010 before posting.

Not doing so, is a trap fo' young playas. :)

PS - Nice yelling by the way thumbup1.gif

Link to comment

PS - Nice yelling by the way thumbup1.gif

Thanks, let's hope Michael agree...

Tool feedback;

  • At first I couldn't understand why the tool was failing, but then I looked into the code and realized that you had to use a specific connector pane pattern.
    • this should at least be stated in the ReadMe
    • ideally I'd like to be able to use any connector layout. In most cases it really doesn't matter where the LVOOP controls are connected, only on methods that combine, compare etc. is this a problem.

    [*]The first point leads me to the next one, error handling. I really don't like that the tool runs without any feedback. If it fails on a number of VIs, this should be displayed to the user.[*]The tool should check that the control being renamed is of the correct class. If another class is connected to the upper left corner this will also be renamed to the class name

Once I figured this out, the tool runs very smooth. :beer_mug:

Code feedback

  • The VI "Rename LVOOP FP Objects__icon_lib_scripting.vi" does not close control references if cating to "LabVIEWClassControl" fails
  • The VI "Rename LVOOP FP Objects__icon_lib_scripting.vi" fetches the library name in every loop iteration, but this could be done before we enter the loop.
  • The VI "Align All Block Diagram Labels__icon_lib_scripting.vi! could be realized with just one loop instead of three, using a select node to select left or right justification depending on if the object is an indicator or not.

/J

  • Like 1
Link to comment

Tool feedback;

  • At first I couldn't understand why the tool was failing, but then I looked into the code and realized that you had to use a specific connector pane pattern.
    • this should at least be stated in the ReadMe
    • ideally I'd like to be able to use any connector layout. In most cases it really doesn't matter where the LVOOP controls are connected, only on methods that combine, compare etc. is this a problem.

    [*]The first point leads me to the next one, error handling. I really don't like that the tool runs without any feedback. If it fails on a number of VIs, this should be displayed to the user.[*]The tool should check that the control being renamed is of the correct class. If another class is connected to the upper left corner this will also be renamed to the class name

Once I figured this out, the tool runs very smooth. :beer_mug:

Thanks Jonas for the feedback!

My Design Decisions:

The tool was designed for working with LVOOP, so I made the assumption (which combined with scripting this is a very powerful concept - I think Norm mentions that on the Darkside) of using the 4x2x2x4 CP as standard. I did not see the need to support every CP (nor did I want to code it when I never would use it)

Unless you are using GDS, you would have a lot of work for changing each connector pane from the default and if you did you probably have your own scripting tools?

But I will add that to the Readme for now and look into possible support for other panes in the future.

Which makes me ask - what CP patterns do you use frequently with LVOOP?

So the reason for silent error handling is that it not really an error from my point of view

I.e if the plugin encounters something that doesn't fit the criteria then it just ignores it and completes the rest of the tasks.

I didn't see the point of reporting anything.

(On the topic of error handling in general, I don't think their is chained error handling/reporting in QD but I might ask Darren about this as it would be good it QD handled it)

Agreed, I should check for the correct class as the Library [bug].

Code feedback

  • The VI "Rename LVOOP FP Objects__icon_lib_scripting.vi" does not close control references if cating to "LabVIEWClassControl" fails
  • The VI "Rename LVOOP FP Objects__icon_lib_scripting.vi" fetches the library name in every loop iteration, but this could be done before we enter the loop.
  • The VI "Align All Block Diagram Labels__icon_lib_scripting.vi! could be realized with just one loop instead of three, using a select node to select left or right justification depending on if the object is an indicator or not.

Wow and a code review too - thanks heaps! (LAVA members rock!)

Agreed on all parts!

Time for some refactoring!

thumbup1.gif

Link to comment

Thanks Jonas for the feedback!

You are welcome, I really like the idea of the tool.:thumbup1:

My Design Decisions:

The tool was designed for working with LVOOP, so I made the assumption (which combined with scripting this is a very powerful concept - I think Norm mentions that on the Darkside) of using the 4x2x2x4 CP as standard. I did not see the need to support every CP (nor did I want to code it when I never would use it)

Unless you are using GDS, you would have a lot of work for changing each connector pane from the default and if you did you probably have your own scripting tools?

But I will add that to the Readme for now and look into possible support for other panes in the future.

Which makes me ask - what CP patterns do you use frequently with LVOOP?

The class currently edited used 5x3x3x5, and the work made is not that much really; I start by creating the first method, then I just save a copy of that method whenever I need a new one.

So the reason for silent error handling is that it not really an error from my point of view

I.e if the plugin encounters something that doesn't fit the criteria then it just ignores it and completes the rest of the tasks.

In this case I had to go through the code to understand why my renaming didn't work. I don't mean that we should throw errors for any control not matching the criteria, I would just like to have more control. In this case the main issue was probably the missing information in the ReadMe.

As an alternative, you could pop-up a dialog if shift-z was pressed, and give the user a number of replacement options; move label?, limit to CP X?, replace on all VIs in class?, etc..

Wow and a code review too - thanks heaps! (LAVA members rock!)

Agreed on all parts!

Sorry, couldn't help it. :oops:

/J

Link to comment

You are welcome, I really like the idea of the tool.:thumbup1:

The class currently edited used 5x3x3x5, and the work made is not that much really; I start by creating the first method, then I just save a copy of that method whenever I need a new one.

Sweet, I am happy to add support for 5x3x3x5 for you whilst I fix following for the next release?:

Must belong to same Class [bug]

Update ReadMe

No read-only files in package

Refactor the above code

Is that cool?

Link to comment

I have updated this plugin to add support for the following:

  • 1.1-1 2010 09 02
  • Added (): Support for templates with connector panes: 5x3x3x5, 6x4x4x6, 8x6x6x8.
  • Fixed (): Class Control must belong to the same Class in order to be updated
  • Fixed (): Compatiable with VIPM 2010 - No read-only files included in package.

Use this plugin when you have changed the Class's name or Cloned a Class and want to update all the Front Panel Object Labels quickly.

Thanks for the feedback Mellroth (hope you like the new changes).

Cheers

-JG

<object id="scPlayer" class="embeddedObject" width="1027" height="913" type="application/x-shockwave-flash" data="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/ca86669e-be3b-4471-bd9c-0e0a32e97c85/jingswfplayer.swf"> <param name="movie" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/ca86669e-be3b-4471-bd9c-0e0a32e97c85/jingswfplayer.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#FFFFFF"> <param name="flashVars" value="thumb=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/ca86669e-be3b-4471-bd9c-0e0a32e97c85/FirstFrame.jpg&containerwidth=1027&containerheight=913&content=http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/ca86669e-be3b-4471-bd9c-0e0a32e97c85/Rename%20LVOOP%20FP%20Object%20Labels%20v1.1.swf&blurover=false"> <param name="allowFullScreen" value="true"> <param name="scale" value="showall"> <param name="allowScriptAccess" value="always"> <param name="base" value="http://content.screencast.com/users/jgcode/folders/LAVA%20CR/media/ca86669e-be3b-4471-bd9c-0e0a32e97c85/"> </object>

  • Like 2
Link to comment

I have updated this plugin to add support for the following:

  • 1.1-1 2010 09 02
  • Added (): Support for templates with connector panes: 5x3x3x5, 6x4x4x6, 8x6x6x8.
  • Fixed (): Class Control must belong to the same Class in order to be updated
  • Fixed (): Compatiable with VIPM 2010 - No read-only files included in package.

I have not tested the new version, but according to the video it looks perfect.

More feedback tomorrow (some of us do sleep rolleyes.gif)

/J

Link to comment
  • 7 months later...

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.