LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out the related Code Repository Files or visit the LabVIEW Wiki Development Environment Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> [CR] Code Capture Tool
Ton
post Nov 8 2007, 06:01 PM
Post #1


CCT It
*****

Premium Member
Posts: 1331
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery



File Name: Code Capture Tool
File Submitter: Ton
File Submitted: 7 Nov 2007
File Updated: 8 Jul 2008
File Category: LabVIEW Development Environment

Code Capture Tool Readme
This tool can be used to get shots of LabVIEW code or GUIs and store them on disk or the OS clipboard. It resides on the Tools menu and inside the user.lib palette.
The palette provides access to a full API for capturing specific parts of code and/or GUI of VIs.







Installation instructions
Upon downloading the zip file extract it to the folder of your choice and open the Install Code Capture Tool.vi file. This will launch the installer.
After finishing the install wizard a LabVIEW restart is necessary to load the VI into the Tools menu and the user.lib palette.

Contact
The Code Capture Tool is finished by Ton Plomp and Yair Neeman.
Thank yous can be expressed to the NI Forums community, bugs and comments on the LAVA community.

Usage
Open the Code Capture Tool via the 'Tools' menu
A lot of information is shown in the about screen.
A comprehensive explanation of the API and GUI is given on the LabVIEW Wiki page on this item


Uninstalling
To remove the Code Capture Tool from your LabVIEW installation remove the following files in your LabVIEW folder:
ProjectCode Capture Tool.vi
user.libCCT.mnu

And the following folder:
user.lib_Code Capture Tool

In your LabVIEW data folder (On windows normally: My documentsLabVIEW Data) is a file called Code Capture Tool.ini, this can be removed at any moment

The latest version is 1.0.0, later edits on this page shift the date of release.

License

This code is covered under the BSD license, parts are covered by the GNU LGPL.
Further information about licensing and acknowledgements can be found in the about screen of the Code Capture Tool.

LabVIEW is a trademark of National Instruments




Click here to download this file

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Nov 8 2007, 06:01 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Yair
post Nov 8 2007, 06:16 PM
Post #2


Extwemely Active
*****

Premium Member
Posts: 1621
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


Please note that the main use case for this (and the reason it was originally written) is for online use - you can write a quick example and then have an image of it and have the path to that image in the clipboard, so that you just need to paste it in the attachment field.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Michael_Aivaliot...
post Nov 8 2007, 06:47 PM
Post #3


Confucius say: Crowded elevator always smell different to midget
Group Icon
*****

Admin
Posts: 2363
Joined: 13-October 02
From: Planet Earth
Member No.: 2
Using LabVIEW Since:1994
LV:8.5 ,8.2.1 ,7.1.1
Greece Canada United States My Blog My Gallery


Thank you tcplomp and Yen for chosing the LAVA CR for your distribution mechanism. I haven't had the chance to look at this yet. I've actually created my own tool that does something similar. I'll provide feedback when I can. Thanks again.

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Eugen Graf
post Nov 8 2007, 06:52 PM
Post #4


Extremely Active
****

Member
Posts: 359
Joined: 6-February 07
From: Homburg/Germany
Member No.: 7689
Using LabVIEW Since:2004
LV:8.5 ,8.0.1 ,.
Germany Kazakhstan Russia My Gallery


Sorry, can anybody say me why not to use Ctrl+A to select all objects on BD or FP than Ctrl+C to copy to cliboard, then open Paint and use Ctrl+V to put the screenshot from clipboard to Paint? Otherwise Alt+Print to copy the Active Window only?
Is this Code Capture Tool much better? What are the advantages?

Eugen

This post has been edited by Eugen Graf: Nov 8 2007, 06:59 PM

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Nov 8 2007, 07:00 PM
Post #5


CCT It
*****

Premium Member
Posts: 1331
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


QUOTE (Eugen Graf @ Nov 8 2007, 07:52 PM) *
Sorry, can anybody say me why not to use Ctrl+A, then open Paint and use Ctrl+V ? Otherwise Alt+Print?

Eugen

Well it:
  • Creates a file
  • It's a png file (better for web-viewing
  • The file has a meaningfull name (and can be edited upon capturing)
  • It can copy the file name to the clipboard
  • So you can past it directly into:
    Attached Image
  • It can copy the image to the clipboard
  • It can copy a part of your code/panel
  • It was fun for me to build (together with Yen)
Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Yair
post Nov 8 2007, 07:16 PM
Post #6


Extwemely Active
*****

Premium Member
Posts: 1621
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


A couple of additions to what Ton said:
  • Ctrl+A for selecting everything only works in 8.x. This can capture everything even in older versions.
  • It allows you to combine the images of the FP and the BD and to easily select what kind of capturing you want to do.
As said, the main use case so far is for easier posting of code images online, but it has an underlying API, so it can also get code images for other purposes (e.g. documentation).

Also, please note that this is version 0.9.x. The API might still change based on feedback we'll get.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Norm Kirchner
post Nov 8 2007, 07:42 PM
Post #7


Extremely Active
****

Premium Member
Posts: 588
Joined: 8-December 03
From: Dallas, Texas
Member No.: 208
Using LabVIEW Since:2000
LV:8.6 ,8.2.1 ,7.1.1
United States us_texas us_ohio My Gallery


I think you should all look into the Jing Project
http://screencast.com/t/zHuOjFTAk8g

--------------------
Norman J. Kirchner Jr.
Automation Software Engineer

~,~ The Captain Was Here
Premium Blend


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Nov 8 2007, 07:52 PM
Post #8


CCT It
*****

Premium Member
Posts: 1331
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


QUOTE (Norm Kirchner @ Nov 8 2007, 08:42 PM) *
I think you should all look into the Jing Project
http://screencast.com/t/zHuOjFTAk8g

Impressive!
Now I know where to make an instruction video for the Code Capture Tool

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
normandinf
post Jul 14 2008, 08:39 PM
Post #9


Extremely Active
****

Premium Member
Posts: 259
Joined: 18-January 08
From: Montréal, Canada
Member No.: 10515
Using LabVIEW Since:2000
LV:8.6 ,8.5 ,.
ca_quebec Canada Nothing Selected


The CodeCapture tool is really impressive and useful. I like the simplicity of it. thumbup1.gif
Sure will simplify my use of LAVA!

For future upgrades, I would suggest also adding an optional capture of the Project Explorer hierarchy... 69_69.gif
I didn't find any Private methods for "Project: Get Scaled Image"... I wonder if it's easily accessible?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
JiMM
post Jul 14 2008, 09:27 PM
Post #10


Very Active
***

Member
Posts: 93
Joined: 11-October 07
From: Tarboro, NC
Member No.: 9577
Using LabVIEW Since:2001
LV:7.1 ,. ,.
United States us_north_carolina Nothing Selected


QUOTE (Eugen Graf @ Nov 8 2007, 02:52 PM) *
Is this Code Capture Tool much better? What are the advantages?

Eugen

I have a program called MWSnap that is easy to use for screen captures, so I had ignored previous postings for the CCT until today. I can without reservation say that it is by far the best way to post images of LabVIEW code and FPs. It is a unitasker in that it only works in LV, but it does it's "unitask" superbly. Thanks again to Ton and Yair. worshippy.gif beer_mug.gif beer_mug.gif

--------------------
Jim



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Yair
post Jul 15 2008, 03:03 PM
Post #11


Extwemely Active
*****

Premium Member
Posts: 1621
Joined: 23-January 05
From: Here
Member No.: 1431
Using LabVIEW Since:2003
LV:8.6 ,7.0 ,.
Israel Nothing Selected Nothing Selected


QUOTE (normandinf @ Jul 14 2008, 11:39 PM) *
I didn't find any Private methods for "Project: Get Scaled Image"... I wonder if it's easily accessible?

I don't see why it should be. It makes sense to export the diagram as an image, but it doesn't really make sense to explore the project window as an image.

The workarounds I can think of are capturing the image of the window (OS specific and doesn't take scrolling and collapsed elements into account) or using scripting to read the data in the project window and construct a graphical representation of it (assuming the data is even available). Neither sounds like a great option.

P.S. Thanks, Jim.

Great quotes, both here and in the NI forums.

--------------------
More than meets the eye...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
normandinf
post Jul 15 2008, 03:46 PM
Post #12


Extremely Active
****

Premium Member
Posts: 259
Joined: 18-January 08
From: Montréal, Canada
Member No.: 10515
Using LabVIEW Since:2000
LV:8.6 ,8.5 ,.
ca_quebec Canada Nothing Selected


QUOTE (Yair @ Jul 15 2008, 11:03 AM) *
I don't see why it should be. It makes sense to export the diagram as an image, but it doesn't really make sense to explore the project window as an image.


I thought it could be useful for educational purposes (showing project hierarchy as png). But you're right, I was not surprised not to find such a method. Through private methods, we can access the list of VI's in the hierarchy and that's all a programmer really needs I guess.

thanks and congrats,


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
rolfk
post Jul 16 2008, 08:06 AM
Post #13


<customize this text>
*****

Premium Member
Posts: 1001
Joined: 9-April 04
From: Rotterdam
Member No.: 349
Using LabVIEW Since:1992
LV:8.5.1 ,8.2.1 ,7.1.1
Netherlands Switzerland Nothing Selected


QUOTE (normandinf @ Jul 14 2008, 04:39 PM) *
The CodeCapture tool is really impressive and useful. I like the simplicity of it. thumbup1.gif
Sure will simplify my use of LAVA!

For future upgrades, I would suggest also adding an optional capture of the Project Explorer hierarchy... 69_69.gif
I didn't find any Private methods for "Project: Get Scaled Image"... I wonder if it's easily accessible?


This wouldn't be very logical because the project window is not a LabVIEW control but a complete LabVIEW VI. So instead of creating a special method Project: Get Scaled Image method in the LabVIEW application hierarchy what you would need to do is get hold of the VI reference that the project window really is and then get the FP image from there. Of course this would c