LAVA: [Discuss] Code Capture Tool - LAVA

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[Discuss] Code Capture Tool Rate Topic: ***** 1 Votes

#1 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 03 July 2009 - 06:12 AM

Posted Image Name: Code Capture Tool Submitter: Ton Plomp Submitted: 03 Jul 2009 File Updated: 15 Feb 2010 Category: LabVIEW IDE Version: 2.1.0 LabVIEW Version: 7.0 License Type: BSD (Most common) This tool provides an API for creating images of LabVIEW code as well a GUI for easy capturing and use of code.
Further info is provided in the help-screen (F1) of the program.

For the latest version visit the Code Repository
For the latest version of the source code, visit SourceForge
For more info, visit the LabVIEW wiki with the documenation.
A series of videos is available on screencat: Code Capture Tool




Installation
============
To install the Code Capture Tool, run the 'Install Code Capture Tool.vi' in the LabVIEW version of your choice.
A wizard will guide you through the installation procedure.

Usage
============
After installing and restarting LabVIEW, you can open the Code Capture Tool via the 'Tools' menu to capture an image of the current VI.

For more info open the About screen of the GUI.

Uninstalling
============
To remove the Code Capture Tool from your LabVIEW installation remove the following files in your LabVIEW folder:
Project\Code Capture Tool.vi
user.lib\CCT.mnu

And the following folder:
user.lib\_Code Capture Tool

In your LabVIEW data folder (in Windows, this is normally: My documents\LabVIEW Data) is a configuration file called Code Capture Tool.ini, which can be removed at any moment.

Contact
============
Comments, bugs and thank yous can be expressed to the NI Forums community , and on the LAVA community at the CCT discussion thread. Click here to download this file
2

#2 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 08 October 2009 - 08:09 PM

Hi All,

I am looking for beta testers of a new version of the Code Capture Tool.

Especially people in posession of multiple LabVIEW versions on Mac and Linux.

So if you could sent me a PM with your configuration, I try to respond to you.

Ton
0

#3 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 27 November 2009 - 01:18 PM

I tried to install this from VIPM without success.  VIPM couldn't install it for LV 8.2; 8.6 completed successfully but I got an "Error 7 occurred at Open Config Data.vi" in 8.6.  I went back and ran Install Code Capture Tool.vi in 8.6 and got the same error.  

Without CCT, I'll have to resort to  taking pictures of my monitor to attach to my posts.   :wacko:
Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#4 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 27 November 2009 - 02:00 PM

Hi jcarmody,

what OS are you on?
Do you have read/write privileges on your LabVIEW data folder? Especially the Code Capture Tool.ini file?

Ton
0

#5 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 27 November 2009 - 07:24 PM

View PostTon Plomp, on 27 November 2009 - 09:00 AM, said:

what OS are you on?
Do you have read/write privileges on your LabVIEW data folder? Especially the Code Capture Tool.ini file?

Windows XP
Yes
Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#6 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 27 November 2009 - 08:17 PM

View Postjcarmody, on 27 November 2009 - 02:18 PM, said:

I tried to install this from VIPM without success.  VIPM couldn't install it for LV 8.2; 8.6 completed successfully but I got an "Error 7 occurred at Open Config Data.vi" in 8.6.  I went back and ran Install Code Capture Tool.vi in 8.6 and got the same error.  

Could you run the Install Code Capture Tool.vi on 8.2?
I have tested the OGP file on Vista for all versions I currently have (7.0-2009)

View Postjcarmody, on 27 November 2009 - 08:24 PM, said:

Windows XP
Yes

Will try to check that later.
I will sent you an edited version privatly.

Ton
1

#7 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 27 November 2009 - 11:01 PM

I just tried Install Code Capture Tool.vi on 8.2 without success.  I've attached a screen capture of the result.  A small window flashes after a slight pause, before the error message comes up.  Perhaps that's a clue to what's happening?

I tried the version you sent privately, but it didn't change anything.  Perhaps I'll wait a few days to see if other folks with XP have the same trouble I'm having.  I'd hate to have you spend time fixing something that isn't broken on your end.

Thanks.

Attached File(s)

  • Attached File  cct.swf (126.5K)
    Number of downloads: 73

Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#8 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 28 November 2009 - 01:43 PM

View Postjcarmody, on 28 November 2009 - 12:01 AM, said:

I just tried Install Code Capture Tool.vi on 8.2 without success.  I've attached a screen capture of the result.  A small window flashes after a slight pause, before the error message comes up.  Perhaps that's a clue to what's happening?

I tried the version you sent privately, but it didn't change anything.  Perhaps I'll wait a few days to see if other folks with XP have the same trouble I'm having.  I'd hate to have you spend time fixing something that isn't broken on your end.

Thanks.

I was able to replicate the problem you have (on XP)
Trying to debug...

Ton
0

#9 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 28 November 2009 - 03:32 PM

Run the attached VI.Attached File  Openrwconfig.vi (11.13K)
Number of downloads: 84
This will open the BD of the VI with the bug.
Delete the input wire of the 'Open Config VI.'
Attached Image: 1ReadWriteConfig__CCT_BD.png

The next release will have this fixed.

Ton
0

#10 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 28 November 2009 - 04:34 PM

 That did it for both LV versions.  Thanks.
Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#11 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 28 November 2009 - 07:12 PM

Version 2.0.5 has been released fixing the 'error 7' bug.

Ton
0

#12 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 30 November 2009 - 08:28 AM

Here's a demonstration video with the new (2.0) features:<br/>

<object width="360" height="554"> <param name="movie" value="http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/CCT2.0_controller.swf"></param> <param name="quality" value="high"></param> <param name="bgcolor" value="#FFFFFF"></param> <param name="flashVars" value="thumb=http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/FirstFrame.png&containerwidth=360&containerheight=554&showstartscreen=true&showendscreen=true&loop=false&autostart=false&color=1A1A1A,1A1A1A&thumb=FirstFrame.png&thumbscale=45&content=http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/CCT2.0.mp4"></param> <param name="allowFullScreen" value="true"></param> <param name="scale" value="showall"></param> <param name="allowScriptAccess" value="always"></param> <param name="base" value="http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/"></param> <embed src="http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/CCT2.0_controller.swf" quality="high" bgcolor="#FFFFFF" width="360" height="554" type="application/x-shockwave-flash" allowScriptAccess="always" flashVars="thumb=http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/FirstFrame.png&containerwidth=360&containerheight=554&showstartscreen=true&showendscreen=true&loop=false&autostart=false&color=1A1A1A,1A1A1A&thumb=FirstFrame.png&thumbscale=45&content=http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/CCT2.0.mp4" allowFullScreen="true" base="http://content.screencast.com/users/TonPlomp/folders/Default/media/4a988906-a72a-41f4-a978-35e68c0f2d20/" scale="showall"></embed> </object>
1

#13 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 30 November 2009 - 01:21 PM

The Code Capture Tool rocks. :thumbup1: I love it. :wub:.  The video was a great touch, too.

Just to be clear (because I can't test it) folks will be able to drag a snippet made with the CCT in LV 8.6 to a LV 2009 BD?  I'm wondering when CCT 3.0 will come out, with the ability to extract the code from a snippet in pre-2009 versions...  :unsure:
Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#14 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 30 November 2009 - 05:18 PM

View Postjcarmody, on 30 November 2009 - 02:21 PM, said:

The Code Capture Tool rocks. :thumbup1: I love it. :wub:.  The video was a great touch, too.

Thanks

Quote

Just to be clear (because I can't test it) folks will be able to drag a snippet made with the CCT in LV 8.6 to a LV 2009 BD?

Yes you will, I have created a snippet on Linux 8.2 and imported on Windows 2009

Quote

  I'm wondering when CCT 3.0 will come out, with the ability to extract the code from a snippet in pre-2009 versions...  :unsure:

Shouldn't be too hard (yours to try), but the code is embedded inside a PNG tag as a saved VI, just open up and dump like a merge VI.

Ton
0

#15 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 02 December 2009 - 01:14 AM

View PostTon Plomp, on 30 November 2009 - 12:18 PM, said:

Shouldn't be too hard (yours to try), but the code is embedded inside a PNG tag as a saved VI, just open up and dump like a merge VI.

Here's a LabVIEW 8.6 VI that takes a path to a snippet-embedded PNG file and creates a snippet.vi in the same folder.  I'm not happy with the way I did it; it works, but I have a feeling that there's a more elegant method.  The next thing I'd like to try is to make a JKI RCF plugin that converts a PNG on the BD into code.  It would be nicer to be able to have LabVIEW respond to a PNG being dropped onto the BD; do you know how I might do that?

Hey folks!  This picture is a Snippet made with the Code Capture Tool in LV 8.6!  :thumbup1: 

Attached Image: GetSnippet_BD.png 

Attached File(s)


Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#16 User is offline   Ton Plomp 

  • How many lines per hour? Zero!
  • View gallery
  • Group: Moderators
  • Posts: 1,496
  • Joined: 13-June 05
  • Location:Netherlands
  • Version:LabVIEW 2009
  • Since:2000

Posted 02 December 2009 - 07:45 AM

I am wondering how your code actually works since the snippet is embedded in a 'niVI' chunk preceded by the chunk size.
The snippet is created in 'user.lib\_Code Capture Tool\CCT Class\Software\Methods\Private\Snippet\CCT_Snippet__CCT.vi'
Here is a screenshot of the VI that creates the chunk:
Attached Image: PNG chunk.png
And I think this code should get the actual snippet (tested):
Attached Image: VI Snippet extraction.png

Ton
0

#17 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 02 December 2009 - 12:26 PM

View PostTon Plomp, on 02 December 2009 - 02:45 AM, said:

[...] the snippet is embedded in a 'niVI' chunk preceded by the chunk size. [...]

Thanks.  I actually had studied the vi that embedded the snippet but took the long way around.  It's much prettier now :).

Attached Image: GetSnippet_BD.png

Attached File(s)


Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#18 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 02 December 2009 - 06:04 PM

 Does it make sense to add this to the end of the VI?  Is there a more appropriate way to open a VI for editing?

Attached Image: OpenSnippet.png
Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

#19 User is offline   Yair 

  • Extwemely Active
  • Group: Moderators
  • Posts: 2,180
  • Joined: 23-January 05
  • Version:LabVIEW 2009
  • Since:2003

Posted 02 December 2009 - 06:46 PM

You can open the BD of the VI, select the content and (if I'm not mistaken) even copy it to the clipboard.
0

#20 User is offline   jcarmody 

  • Very Active
  • Group: Premium Member
  • Posts: 460
  • Joined: 18-January 07
  • Location:North Carolina, United (by force) States, Earth
  • Version:LabVIEW 2009
  • Since:2007

Posted 24 December 2009 - 05:12 PM

Here's a LV7.1 llb that will extract a snippet made with the CCT, and a snippet to test it with.  Put the llb into [LabVIEW]\project and restart LabVIEW to use it.  Put the snippet in a BD, select it and click Tools -> GetCCTSnippet.  Now all I need is for folks to make snippets instead of screen shots...

Attached Image: GetSnippet_BD71.png

Attached File(s)


Want a better way to work with Case Structures? Try my CaseSelect plugin for the JKI Right-Click Framework.
Don't just post pictures of your code.  Post Snippets!  Use the  Code Capture Tool for all of your code-sharing needs.

~ In God we trust. Everybody else keep your hands where I can see them.
~ Tu ne cede malis sed contra audentior ito (do not give in to evil but proceed ever more boldly against it) ~ Virgil
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic