Jump to content


Photo
- - - - -

Cleaning up code for reuse

reuse cleanup scripting

  • Please log in to reply
3 replies to this topic

#1 John Lokanis

John Lokanis

    The 500 club

  • Premium Member
  • 577 posts
  • Location:Seattle, WA
  • Version:LabVIEW 2012
  • Since:1993

Posted 08 May 2012 - 11:19 PM

I have been re-factoring and cleaning up some old code for packaging into reuse libraries. After doing several common edits to each file, I decided to automate the process a bit. The result was a simple tool to adjust the controls, panel positions, connector pane, add error clusters and comments.
I decided to share it here so others could borrow some of my ideas and suggest more. As it is, this is saving me a lot of editing time. I hope you find it helpful too.

Attached File  Prep for reuse.zip   168.59K   51 downloads

-John

One improvement I would like to make is for it to scan all open VIs in all application instances on the machine. Right now, it must run in the same app instance as the target VI.
Any ideas how to get references to all app instances active on a target machine?
----------------------------------
John Lokanis
CLA
Twitter: @jlokanis

#2 John Lokanis

John Lokanis

    The 500 club

  • Premium Member
  • 577 posts
  • Location:Seattle, WA
  • Version:LabVIEW 2012
  • Since:1993

Posted 08 May 2012 - 11:41 PM

Of course as soon as I asked that question, I figured out the solution... Here is the updated project...
Attached File  Prep for reuse.zip   173.26K   58 downloads
----------------------------------
John Lokanis
CLA
Twitter: @jlokanis

#3 Mark Balla

Mark Balla

    Extremely Active

  • Premium Member
  • 490 posts
  • Location:Gurnee Illinois
  • Version:LabVIEW 2011
  • Since:1997

Posted 09 May 2012 - 02:06 AM

Hey John back in 2009 I posted my latest version of my SubVI fixer to the CR.
It was mainly created to wire and clean up a front panel after a subvi was created but there is some overlap with your tool set.
I've posted videos as well to demonstrate how it works. There may be some additional tools that you might find useful.

http://lavag.org/top...-ver-6-lv-2009/

Mark

#4 John Lokanis

John Lokanis

    The 500 club

  • Premium Member
  • 577 posts
  • Location:Seattle, WA
  • Version:LabVIEW 2012
  • Since:1993

Posted 11 May 2012 - 07:23 PM

Thanks Mark! I'll take a look at it.
----------------------------------
John Lokanis
CLA
Twitter: @jlokanis





Also tagged with one or more of these keywords: reuse, cleanup, scripting