Code Capture Tool: Difference between revisions
m Changed link |
m Relinked SWF's |
||
Line 1: | Line 1: | ||
{{TOCright}} | {{TOCright}} | ||
= Code Capture Tool = | |||
A short how to is in the [http://www.screencast.com/t/2aWPdibJ9Sk here available] | |||
An extensive discussion and demo of the CCT is [http://www.screencast.com/t/Yhb9IAOc here].<br> | |||
= | == Download == | ||
== | Click [http://lavag.org/index.php?app=downloads&showfile=63 here] to download the file. | ||
[[Image: | == Introduction == | ||
===Front panel settings=== | |||
The Code Capture Tool (or CCT) is a [[LabVIEW]] development tool targeted at LabVIEW users to capture images of their code and make it easier to share those images in online forums. <br><br> The CCT is based on an idea and earlier versions originally released by [http://forums.ni.com/ni/profile?user.id=34024 Chilly Charly] on the [[NI Forums]] as [http://forums.ni.com/ni/board/message?board.id=BreakPoint&thread.id=1020 starware].<br> Later, it evolved to a multiple OS and LabVIEW versions tool for creating code-shots and documentation shots. <br> A collaboration between [http://forums.lavag.org/Yair-m1431.html Yair Neeman] and [[User:Tcplomp|Ton Plomp]] resulted in the 1.0 version of the CCT that is currently available through the [[LAVA CR]] at [http://forums.lavag.org/downloads-file121.html this site]. | |||
= Interface = | |||
The CCT offers two interfaces to make and distribute images of LabVIEW code - a [[Code Capture Tool#GUI|user interface]] and an [[Code Capture Tool#API|API]]. | |||
== GUI == | |||
The user interface of the CCT allows the user to select which parts of a [[Front Panel]] or [[Block Diagram]] should be captured. The resulting image will be stored on disc and optionally the image or the path can be copied to the OS clipboard. | |||
[[Image:CCT GUI.png|frame|center|Code Capture Tool user interface]] | |||
=== Front panel settings === | |||
The Front Panel listbox supplies the following options: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Listbox | ! Listbox | ||
! Item | ! Item | ||
! Captured parts | ! Captured parts | ||
|- | |- | ||
| | | rowspan="4" | [[Image:CCT FP.png]] | ||
| None | | None | ||
| Nothing | | Nothing | ||
|- | |- | ||
| Selected | | Selected | ||
| All selected parts and items in between | | All selected parts and items in between | ||
|- | |- | ||
| Visible | | Visible | ||
| Everything visible in the current panel view | | Everything visible in the current panel view | ||
|- | |- | ||
| All | | All | ||
| Everything on the front panel | | Everything on the front panel | ||
|} | |} | ||
===Block diagram settings=== | |||
The Block Diagram listbox supplies the following options: | === Block diagram settings === | ||
The Block Diagram listbox supplies the following options: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Listbox | ! Listbox | ||
! Item | ! Item | ||
! Captured parts | ! Captured parts | ||
|- | |- | ||
| | | rowspan="4" | [[Image:CCT BD.png]] | ||
| None | | None | ||
| Nothing | | Nothing | ||
|- | |- | ||
| Selected | | Selected | ||
| All selected parts and items in between | | All selected parts and items in between | ||
|- | |- | ||
| Visible | | Visible | ||
| Everything visible in the current block diagram view | | Everything visible in the current block diagram view | ||
|- | |- | ||
| All | | All | ||
| Everything on the block diagram | | Everything on the block diagram | ||
|} | |} | ||
===Clipboard settings=== | === Clipboard settings === | ||
The clipboard listbox supplies the following options: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Listbox | ! Listbox | ||
! Item | ! Item | ||
! Copied item | ! Copied item | ||
! Remarks | ! Remarks | ||
|- | |- | ||
| | | rowspan="3" | [[Image:CCT ClipBoard.png]] | ||
| None | | None | ||
| Nothing | | Nothing | ||
|- | |- | ||
| Path | | Path | ||
| Path of the captured image | | Path of the captured image | ||
| | | | ||
|- | |- | ||
| Image | | Image | ||
| The captured image | | The captured image | ||
| Only on Windows | | Only on Windows | ||
|} | |} | ||
===Layout settings=== | === Layout settings === | ||
The Layout picture ring supplies the following layout options: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Menu Ring | ! Menu Ring | ||
! Item | ! Item | ||
! Description | ! Description | ||
|- | |- | ||
| | | rowspan="4" | [[Image:CCT Layout.png]] | ||
| [[Image: | | [[Image:CCT Layout1.png]] | ||
| Front panel in top, block diagram below | | Front panel in top, block diagram below | ||
|- | |- | ||
| [[Image: | | [[Image:CCT Layout2.png]] | ||
| Block diagram in top, front panel below | | Block diagram in top, front panel below | ||
|- | |- | ||
| [[Image: | | [[Image:CCT Layout3.png]] | ||
| Front panel in left, block diagram on the right | | Front panel in left, block diagram on the right | ||
|- | |- | ||
| [[Image: | | [[Image:CCT Layout4.png]] | ||
| Block diagram in left, front panel on the right | | Block diagram in left, front panel on the right | ||
|} | |} | ||
=== File settings === | |||
=== | |||
[[Image:CCT FileSettings.png]] | |||
[[Image: | |||
The | The file settings consists of two controls, the string control to name the file (a .png extension is added to the name automatically) and a browse button to set the folder where the file should be stored. To detect which folder is currently used hover over one of the two controls and the tip-strip will show the folder. | ||
=== | ==== Resetting the folder ==== | ||
By default the storage folder is the LabVIEW temp folder (which by default is the same as the OS temp folder), and can be changed with the browse for folder button. To revert to the temp folder use this button [[Image:CCT Reset.png]]. | |||
=== Key navigation=== | === Zoom function === | ||
The CCT has several key shortcuts for easier access: | |||
[[Image:CCT Zoom.png]] | |||
The zoom slider allows the user to zoom in and out on the captured image and inspect it in detail. This only affects the preview image and will not change the stored image. | |||
=== Help === | |||
The help button [[Image:CCT Help.png]] calls the about window of the CCT including a short description of the main functions, a link to the webpage, a list of know issues and licensing info. | |||
=== Capture === | |||
The capture button [[Image:CCT Capture.png]] will capture the image, save it, copy to the clipboard, save the currently selected options for the next time and close the window. This can also be done by pressing Enter. | |||
=== Key navigation === | |||
The CCT has several key shortcuts for easier access: | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Key | ! Key | ||
! Function | ! Function | ||
|- | |- | ||
| Enter | | Enter | ||
| Applies the current settings and does a [[ | | Applies the current settings and does a [[Code Capture Tool#Capture|capture]] | ||
|- | |- | ||
| F1 | | F1 | ||
| Loads the about window centered on the help tab | | Loads the about window centered on the help tab | ||
|- | |- | ||
| F5 | | F5 | ||
| Refreshes the current image | | Refreshes the current image | ||
|- | |- | ||
| Escape | | Escape | ||
| Closes the CCT without performing a capture | | Closes the CCT without performing a capture | ||
|} | |} | ||
==API== | == API == | ||
The API provides an interface to the various functions of the CCT. Its palette is accessible under [[ | |||
[[Image: | The API provides an interface to the various functions of the CCT. Its palette is accessible under [[User.lib]]\Code Capture Tool. [[Image:CCT palette.PNG]] | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! [[#Methods|Methods]] | ! [[#Methods|Methods]] | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetSessions.png | img_src=Image:CCT_GetSessions.png | ||
wikipage=Code_Capture_Tool#Create_CCT_Instance | wikipage=Code_Capture_Tool#Create_CCT_Instance | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_Capture_icon.png | img_src=Image:CCT_Capture_icon.png | ||
wikipage=Code_Capture_Tool#Capture_Image | wikipage=Code_Capture_Tool#Capture_Image | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SaveImage.png | img_src=Image:CCT_SaveImage.png | ||
wikipage=Code_Capture_Tool#Save_Image | wikipage=Code_Capture_Tool#Save_Image | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CopyToClipboard.png | img_src=Image:CCT_CopyToClipboard.png | ||
wikipage=Code_Capture_Tool#Copy_to_Clipboard | wikipage=Code_Capture_Tool#Copy_to_Clipboard | ||
</linkedimage> | </linkedimage> | ||
| | | | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CloseSession.png | img_src=Image:CCT_CloseSession.png | ||
wikipage=Code_Capture_Tool#Destroy_CCT_Instance | wikipage=Code_Capture_Tool#Destroy_CCT_Instance | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GenerateFileName.png | img_src=Image:CCT_GenerateFileName.png | ||
Line 188: | Line 200: | ||
</linkedimage> | </linkedimage> | ||
|- | |- | ||
! [[# | ! [[#Set_properties|Set properties]] | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFP.png | img_src=Image:CCT_SetFP.png | ||
wikipage=Code_Capture_Tool#Set_Front_Panel_Mode | wikipage=Code_Capture_Tool#Set_Front_Panel_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetBD.png | img_src=Image:CCT_SetBD.png | ||
wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode | wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetLayout.png | img_src=Image:CCT_SetLayout.png | ||
wikipage=Code_Capture_Tool#Set_Layout_Mode | wikipage=Code_Capture_Tool#Set_Layout_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetClipboard.png | img_src=Image:CCT_SetClipboard.png | ||
wikipage=Code_Capture_Tool#Set_Clipboard_Mode | wikipage=Code_Capture_Tool#Set_Clipboard_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetVI.png | img_src=Image:CCT_SetVI.png | ||
wikipage=Code_Capture_Tool#Set_VI_Ref | wikipage=Code_Capture_Tool#Set_VI_Ref | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFolder.png | img_src=Image:CCT_SetFolder.png | ||
wikipage=Code_Capture_Tool#Set_Folder | wikipage=Code_Capture_Tool#Set_Folder | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFileName.png | img_src=Image:CCT_SetFileName.png | ||
Line 218: | Line 230: | ||
</linkedimage> | </linkedimage> | ||
|- | |- | ||
! [[# | ! [[#Get_properties|Get properties]] | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFP.png | img_src=Image:CCT_GetFP.png | ||
wikipage=Code_Capture_Tool#Get_Front_Panel_Mode | wikipage=Code_Capture_Tool#Get_Front_Panel_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetBD.png | img_src=Image:CCT_GetBD.png | ||
wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode | wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetLayout.png | img_src=Image:CCT_GetLayout.png | ||
wikipage=Code_Capture_Tool#Get_Layout_Mode | wikipage=Code_Capture_Tool#Get_Layout_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetClipboard.png | img_src=Image:CCT_GetClipboard.png | ||
wikipage=Code_Capture_Tool#Get_Clipboard_Mode | wikipage=Code_Capture_Tool#Get_Clipboard_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetVI.png | img_src=Image:CCT_GetVI.png | ||
wikipage=Code_Capture_Tool#Get_VI_Ref | wikipage=Code_Capture_Tool#Get_VI_Ref | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFolder.png | img_src=Image:CCT_GetFolder.png | ||
wikipage=Code_Capture_Tool#Get_Folder | wikipage=Code_Capture_Tool#Get_Folder | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFileName.png | img_src=Image:CCT_GetFileName.png | ||
Line 248: | Line 260: | ||
</linkedimage> | </linkedimage> | ||
|- | |- | ||
! [[#Support|Support]] | ! [[#Support|Support]] | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_Support.png | img_src=Image:CCT_Support.png | ||
wikipage=Code_Capture_Tool#Support | wikipage=Code_Capture_Tool#Support | ||
</linkedimage> | </linkedimage> | ||
| | | | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CaptureFP.png | img_src=Image:CCT_CaptureFP.png | ||
wikipage=Code_Capture_Tool#Capture_Front_panel | wikipage=Code_Capture_Tool#Capture_Front_panel | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CaptureBD.png | img_src=Image:CCT_CaptureBD.png | ||
wikipage=Code_Capture_Tool#Capture_Block_diagram | wikipage=Code_Capture_Tool#Capture_Block_diagram | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_ShowGUI.png | img_src=Image:CCT_ShowGUI.png | ||
wikipage=Code_Capture_Tool#Show_CCT_GUI | wikipage=Code_Capture_Tool#Show_CCT_GUI | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_70Container.png | img_src=Image:CCT_70Container.png | ||
wikipage=Code_Capture_Tool#7.0_container_VI | wikipage=Code_Capture_Tool#7.0_container_VI | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_80_Container.png | img_src=Image:CCT_80_Container.png | ||
Line 276: | Line 288: | ||
|} | |} | ||
===Methods=== | === Methods === | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! [[#Methods|Methods]] | ! [[#Methods|Methods]] | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetSessions.png | img_src=Image:CCT_GetSessions.png | ||
wikipage=Code_Capture_Tool#Create_CCT_Instance | wikipage=Code_Capture_Tool#Create_CCT_Instance | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_Capture_icon.png | img_src=Image:CCT_Capture_icon.png | ||
wikipage=Code_Capture_Tool#Capture_Image | wikipage=Code_Capture_Tool#Capture_Image | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SaveImage.png | img_src=Image:CCT_SaveImage.png | ||
wikipage=Code_Capture_Tool#Save_Image | wikipage=Code_Capture_Tool#Save_Image | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CopyToClipboard.png | img_src=Image:CCT_CopyToClipboard.png | ||
wikipage=Code_Capture_Tool#Copy_to_Clipboard | wikipage=Code_Capture_Tool#Copy_to_Clipboard | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CloseSession.png | img_src=Image:CCT_CloseSession.png | ||
wikipage=Code_Capture_Tool#Destroy_CCT_Instance | wikipage=Code_Capture_Tool#Destroy_CCT_Instance | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GenerateFileName.png | img_src=Image:CCT_GenerateFileName.png | ||
Line 305: | Line 318: | ||
</linkedimage> | </linkedimage> | ||
|} | |} | ||
These VIs are used to activate methods for the CCT. | |||
==== Create CCT Instance ==== | |||
[[Image:CCT Create CCT.png|Creat CCT Instance]] | |||
This VI must be called for every instance of the CCT, it creates a GOOP dataspace that will contain the data of the instance. Calling this VI must be done with a valid VI reference. | |||
==== Capture Image ==== | |||
[[Image:CCT Capture VI Images CCT.png|Capture Images]] | |||
[[Image: | |||
This VI will | This VI will apply the current settings and store the captured image in the CCT instance, additionally it returns the image itself. | ||
==== | ==== Save Image ==== | ||
[[Image:CCT Save Captured Image CCT.png|Save Image]] | |||
This VI will save the image to the path specified by a folder and filename stored in the CCT instance. | |||
==== Copy to Clipboard ==== | |||
[[Image:CCT Copy Data to Clipboard CCT.png|Copy to Clipboard]] | |||
[[ | |||
This VI will generate a default filename based on the captured parts and VI name. This filename will not be stored inside the CCT session. | This VI will store the data specified by the clipboard settings to the clipboard. | ||
==== Destroy CCT Instance ==== | |||
[[Image:CCT Destroy CCT.png|Destroy CCT Instance]] | |||
This VI must be called to close the CCT Instance and will free up used memory resources. | |||
==== Generate File Name ==== | |||
[[Image:CCT Generate File Name CCT.png|Generate filename]] | |||
This VI will generate a default filename based on the captured parts and VI name. This filename will not be stored inside the CCT session. | |||
=== Set properties === | |||
{| class="wikitable" | {| class="wikitable" | ||
! [[# | |- | ||
! [[#Set_properties|Set properties]] | |||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFP.png | img_src=Image:CCT_SetFP.png | ||
wikipage=Code_Capture_Tool#Set_Front_Panel_Mode | wikipage=Code_Capture_Tool#Set_Front_Panel_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetBD.png | img_src=Image:CCT_SetBD.png | ||
wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode | wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetLayout.png | img_src=Image:CCT_SetLayout.png | ||
wikipage=Code_Capture_Tool#Set_Layout_Mode | wikipage=Code_Capture_Tool#Set_Layout_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetClipboard.png | img_src=Image:CCT_SetClipboard.png | ||
wikipage=Code_Capture_Tool#Set_Clipboard_Mode | wikipage=Code_Capture_Tool#Set_Clipboard_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetVI.png | img_src=Image:CCT_SetVI.png | ||
wikipage=Code_Capture_Tool#Set_VI_Ref | wikipage=Code_Capture_Tool#Set_VI_Ref | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFolder.png | img_src=Image:CCT_SetFolder.png | ||
wikipage=Code_Capture_Tool#Set_Folder | wikipage=Code_Capture_Tool#Set_Folder | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_SetFileName.png | img_src=Image:CCT_SetFileName.png | ||
Line 368: | Line 391: | ||
</linkedimage> | </linkedimage> | ||
|} | |} | ||
This VI will change the current front panel capture mode. | These VIs are used to change properties for the CCT instance. | ||
==== Set Front Panel Mode ==== | |||
[[Image:CCT Set FP Mode CCT.png|Set FP mode]] | |||
This VI will change the current front panel capture mode. | |||
==== Set Block Diagram Mode ==== | |||
[[Image:CCT Set BD Mode CCT.png|Set BD mode]] | |||
This VI will change the current block diagram capture mode. | |||
==== Set Layout Mode ==== | |||
[[Image:CCT Set Layout Mode CCT.png|Set Layout mode]] | |||
[[Image: | |||
This VI will change the current | This VI will change the current layout orientation. | ||
====Set | ==== Set Clipboard Mode ==== | ||
[[Image:CCT Set Clipboard Mode CCT.png|Set Clipboard mode]] | |||
This VI will change the current clipboard mode. | |||
==== Set VI Ref ==== | |||
[[Image:CCT Set VI Ref CCT.png|Set Clipboard mode]] | |||
[[Image: | |||
This VI sets the reference of the VI that needs to be captured | This VI sets the reference of the VI that needs to be captured | ||
====Set Folder==== | ==== Set Folder ==== | ||
[[Image:CCT Set Folder CCT.png|Set Folder]] | |||
This VI will change the folder where the images will be saved. | |||
This VI will change the filename of the stored image. | ==== Set Filename ==== | ||
[[Image:CCT Set File CCT.png|Set Filename]] | |||
This VI will change the filename of the stored image. | |||
=== Get properties === | |||
{| class="wikitable" | {| class="wikitable" | ||
! [[# | |- | ||
! [[#Get_properties|Get properties]] | |||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFP.png | img_src=Image:CCT_GetFP.png | ||
wikipage=Code_Capture_Tool#Get_Front_Panel_Mode | wikipage=Code_Capture_Tool#Get_Front_Panel_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetBD.png | img_src=Image:CCT_GetBD.png | ||
wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode | wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetLayout.png | img_src=Image:CCT_GetLayout.png | ||
wikipage=Code_Capture_Tool#Get_Layout_Mode | wikipage=Code_Capture_Tool#Get_Layout_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetClipboard.png | img_src=Image:CCT_GetClipboard.png | ||
wikipage=Code_Capture_Tool#Get_Clipboard_Mode | wikipage=Code_Capture_Tool#Get_Clipboard_Mode | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetVI.png | img_src=Image:CCT_GetVI.png | ||
wikipage=Code_Capture_Tool#Get_VI_Ref | wikipage=Code_Capture_Tool#Get_VI_Ref | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFolder.png | img_src=Image:CCT_GetFolder.png | ||
wikipage=Code_Capture_Tool#Get_Folder | wikipage=Code_Capture_Tool#Get_Folder | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_GetFileName.png | img_src=Image:CCT_GetFileName.png | ||
Line 436: | Line 470: | ||
</linkedimage> | </linkedimage> | ||
|} | |} | ||
====Get Front Panel Mode==== | These VIs are used to retrieve properties from the CCT instance. | ||
[[Image: | |||
==== Get Front Panel Mode ==== | |||
[[Image:CCT Get FP Setting CCT.png|Get FP mode]] | |||
This VI will read the current front panel capture mode. | |||
==== Get Block Diagram Mode ==== | |||
[[Image:CCT Get BD Mode CCT.png|Get BD mode]] | |||
This VI will read the current block diagram capture mode. | |||
==== Get Layout Mode ==== | |||
[[Image:CCT Get Layout Mode CCT.png|Get Layout mode]] | |||
This VI will read the current layout orientation. | |||
==== Get Clipboard Mode ==== | |||
[[Image:CCT Get Clipboard Mode CCT.png|Get Clipboard mode]] | |||
[[Image: | |||
This VI will read the current | This VI will read the current clipboard mode. | ||
====Get | ==== Get VI Ref ==== | ||
[[Image:CCT Get VI Ref CCT.png|Get VI Reference]] | |||
This VI returns a reference to the that is currently captured in this isntance | |||
==== Get Folder ==== | |||
[[Image:CCT Get Folder CCT.png|Get Folder]] | |||
[[Image: | |||
This VI | This VI will read the folder where the images will be saved. | ||
====Get | ==== Get Filename ==== | ||
[[Image:CCT Get File CCT.png|Get Filename]] | |||
This VI will read the filename of the stored image. | |||
=== Support === | |||
{| class="wikitable" | {| class="wikitable" | ||
! [[#Support|Support]] | |- | ||
! [[#Support|Support]] | |||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CaptureFP.png | img_src=Image:CCT_CaptureFP.png | ||
wikipage=Code_Capture_Tool#Capture_Front_panel | wikipage=Code_Capture_Tool#Capture_Front_panel | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_CaptureBD.png | img_src=Image:CCT_CaptureBD.png | ||
wikipage=Code_Capture_Tool#Capture_Block_diagram | wikipage=Code_Capture_Tool#Capture_Block_diagram | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_ShowGUI.png | img_src=Image:CCT_ShowGUI.png | ||
wikipage=Code_Capture_Tool#Show_CCT_GUI | wikipage=Code_Capture_Tool#Show_CCT_GUI | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_70Container.png | img_src=Image:CCT_70Container.png | ||
wikipage=Code_Capture_Tool#7.0_container_VI | wikipage=Code_Capture_Tool#7.0_container_VI | ||
</linkedimage> | </linkedimage> | ||
| <linkedimage> | | <linkedimage> | ||
img_src=Image:CCT_80_Container.png | img_src=Image:CCT_80_Container.png | ||
Line 497: | Line 541: | ||
</linkedimage> | </linkedimage> | ||
|} | |} | ||
====Capture Front panel==== | This submenu shows additional low level functions of the CCT. | ||
[[Image: | |||
==== Capture Front panel ==== | |||
[[Image:CCT Capture Panel Picture CCT.png|Capture front panel]] | |||
Use this VI to have direct access to the capturing of a front panel. | |||
==== Capture Block diagram ==== | |||
[[Image:CCT Capture Diagram Picture CCT.png|Capture block diagram]] | |||
Use this VI to have direct access to the capturing of a block diagram. | |||
==== Show CCT GUI ==== | |||
[[Image:Code Capture Tool GUI CCT.png|Show CCT GUI]] | |||
[[Image: | |||
Use this VI to show the user interface of the CCT. | Use this VI to show the user interface of the CCT. | ||
====7.0 container VI==== | ==== 7.0 container VI ==== | ||
[[Image:Container 70 CCT.png|7.0 container]] | |||
Use this VI if you want to build a source distribution or an executable and need to make sure all dynamic VIs are included. For LabVIEW 7.0 and up. | |||
Use this VI if you want to build a source distribution or an executable and need to make sure all dynamic VIs are included. For LabVIEW 8.0 and up, don't forget to include the 7.0 container. | ==== 8.0 container VI ==== | ||
[[Image:Container 80 CCT.png|8.0 container]] | |||
Use this VI if you want to build a source distribution or an executable and need to make sure all dynamic VIs are included. For LabVIEW 8.0 and up, don't forget to include the 7.0 container. | |||
= Known issues = | |||
{| class="wikitable" | {| class="wikitable" | ||
! Description | |- | ||
! Description | |||
! Status | ! Status | ||
|- | |- | ||
| After using a non-default path and resetting it to the default, the new setting (temp) is not used | | After using a non-default path and resetting it to the default, the new setting (temp) is not used | ||
| Solved in version 1.0 | | Solved in version 1.0 | ||
|- | |- | ||
| Installing on Linux fails due to case sensitivity | | Installing on Linux fails due to case sensitivity | ||
| Solved in version 1.0 | | Solved in version 1.0 | ||
|- | |- | ||
| Capturing a non-visible part on a multi-pane front panel fails | | Capturing a non-visible part on a multi-pane front panel fails | ||
| A limitation due to the LabVIEW implementation of panes, most-likely not fixable | | A limitation due to the LabVIEW implementation of panes, most-likely not fixable | ||
|- | |- | ||
| Saving an empty image returns an error | | Saving an empty image returns an error | ||
| Solved in version 1.0 | | Solved in version 1.0 | ||
|- | |- | ||
| Opening the CCT from the Getting Started Window locks up LabVIEW | | Opening the CCT from the Getting Started Window locks up LabVIEW | ||
| Solved in version 1.0 | | Solved in version 1.0 | ||
|- | |- | ||
| Possible High use of memory | | Possible High use of memory | ||
| Investigating | | Investigating | ||
|- | |- | ||
| Impossible to capture FP of locked VI | | Impossible to capture FP of locked VI | ||
| Investigating | | Investigating | ||
|} | |} | ||
=Version History= | = Version History = | ||
==Version 1.0.0== | |||
Release date 27 February 2008 | == Version 1.0.0 == | ||
*Bug-fixes | |||
Release date 27 February 2008 | |||
*Bug-fixes | |||
*Support for panning of the preview | *Support for panning of the preview | ||
==Version 0.9.1== | == Version 0.9.1 == | ||
Release date 7 November 2007<br | |||
Support for LabVIEW 7.x and up<br | Release date 7 November 2007<br> Support for LabVIEW 7.x and up<br> Support for all OS'es<br> Support for orientation<br> Support for selection<br> Support for customized naming<br> Support for customized folder<br> | ||
Support for all OS'es<br | |||
Support for orientation<br | = Licensing = | ||
Support for selection<br | |||
Support for customized naming<br | The CCT is licensed under the BSD license | ||
Support for customized folder<br | |||
[[Category:Third_party_LabVIEW_tools]] | |||
Revision as of 21:23, 8 August 2009
Code Capture Tool
A short how to is in the here available
An extensive discussion and demo of the CCT is here.
Download
Click here to download the file.
Introduction
The Code Capture Tool (or CCT) is a LabVIEW development tool targeted at LabVIEW users to capture images of their code and make it easier to share those images in online forums.
The CCT is based on an idea and earlier versions originally released by Chilly Charly on the NI Forums as starware.
Later, it evolved to a multiple OS and LabVIEW versions tool for creating code-shots and documentation shots.
A collaboration between Yair Neeman and Ton Plomp resulted in the 1.0 version of the CCT that is currently available through the LAVA CR at this site.
Interface
The CCT offers two interfaces to make and distribute images of LabVIEW code - a user interface and an API.
GUI
The user interface of the CCT allows the user to select which parts of a Front Panel or Block Diagram should be captured. The resulting image will be stored on disc and optionally the image or the path can be copied to the OS clipboard.
Front panel settings
The Front Panel listbox supplies the following options:
Listbox | Item | Captured parts |
---|---|---|
None | Nothing | |
Selected | All selected parts and items in between | |
Visible | Everything visible in the current panel view | |
All | Everything on the front panel |
Block diagram settings
The Block Diagram listbox supplies the following options:
Listbox | Item | Captured parts |
---|---|---|
None | Nothing | |
Selected | All selected parts and items in between | |
Visible | Everything visible in the current block diagram view | |
All | Everything on the block diagram |
Clipboard settings
The clipboard listbox supplies the following options:
Listbox | Item | Copied item | Remarks |
---|---|---|---|
None | Nothing | ||
Path | Path of the captured image | ||
Image | The captured image | Only on Windows |
Layout settings
The Layout picture ring supplies the following layout options:
File settings
The file settings consists of two controls, the string control to name the file (a .png extension is added to the name automatically) and a browse button to set the folder where the file should be stored. To detect which folder is currently used hover over one of the two controls and the tip-strip will show the folder.
Resetting the folder
By default the storage folder is the LabVIEW temp folder (which by default is the same as the OS temp folder), and can be changed with the browse for folder button. To revert to the temp folder use this button .
Zoom function
The zoom slider allows the user to zoom in and out on the captured image and inspect it in detail. This only affects the preview image and will not change the stored image.
Help
The help button calls the about window of the CCT including a short description of the main functions, a link to the webpage, a list of know issues and licensing info.
Capture
The capture button will capture the image, save it, copy to the clipboard, save the currently selected options for the next time and close the window. This can also be done by pressing Enter.
The CCT has several key shortcuts for easier access:
Key | Function |
---|---|
Enter | Applies the current settings and does a capture |
F1 | Loads the about window centered on the help tab |
F5 | Refreshes the current image |
Escape | Closes the CCT without performing a capture |
API
The API provides an interface to the various functions of the CCT. Its palette is accessible under User.lib\Code Capture Tool.
Methods | <linkedimage>
img_src=Image:CCT_GetSessions.png wikipage=Code_Capture_Tool#Create_CCT_Instance </linkedimage> |
<linkedimage>
img_src=Image:CCT_Capture_icon.png wikipage=Code_Capture_Tool#Capture_Image </linkedimage> |
<linkedimage>
img_src=Image:CCT_SaveImage.png wikipage=Code_Capture_Tool#Save_Image </linkedimage> |
<linkedimage>
img_src=Image:CCT_CopyToClipboard.png wikipage=Code_Capture_Tool#Copy_to_Clipboard </linkedimage> |
<linkedimage>
img_src=Image:CCT_CloseSession.png wikipage=Code_Capture_Tool#Destroy_CCT_Instance </linkedimage> |
<linkedimage>
img_src=Image:CCT_GenerateFileName.png wikipage=Code_Capture_Tool#Generate_File_Name </linkedimage> | |
---|---|---|---|---|---|---|---|
Set properties | <linkedimage>
img_src=Image:CCT_SetFP.png wikipage=Code_Capture_Tool#Set_Front_Panel_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetBD.png wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetLayout.png wikipage=Code_Capture_Tool#Set_Layout_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetClipboard.png wikipage=Code_Capture_Tool#Set_Clipboard_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetVI.png wikipage=Code_Capture_Tool#Set_VI_Ref </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetFolder.png wikipage=Code_Capture_Tool#Set_Folder </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetFileName.png wikipage=Code_Capture_Tool#Set_Filename </linkedimage> |
Get properties | <linkedimage>
img_src=Image:CCT_GetFP.png wikipage=Code_Capture_Tool#Get_Front_Panel_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetBD.png wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetLayout.png wikipage=Code_Capture_Tool#Get_Layout_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetClipboard.png wikipage=Code_Capture_Tool#Get_Clipboard_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetVI.png wikipage=Code_Capture_Tool#Get_VI_Ref </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetFolder.png wikipage=Code_Capture_Tool#Get_Folder </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetFileName.png wikipage=Code_Capture_Tool#Get_Filename </linkedimage> |
Support | <linkedimage>
img_src=Image:CCT_Support.png wikipage=Code_Capture_Tool#Support </linkedimage> |
<linkedimage>
img_src=Image:CCT_CaptureFP.png wikipage=Code_Capture_Tool#Capture_Front_panel </linkedimage> |
<linkedimage>
img_src=Image:CCT_CaptureBD.png wikipage=Code_Capture_Tool#Capture_Block_diagram </linkedimage> |
<linkedimage>
img_src=Image:CCT_ShowGUI.png wikipage=Code_Capture_Tool#Show_CCT_GUI </linkedimage> |
<linkedimage>
img_src=Image:CCT_70Container.png wikipage=Code_Capture_Tool#7.0_container_VI </linkedimage> |
<linkedimage>
img_src=Image:CCT_80_Container.png wikipage=Code_Capture_Tool#8.0_container_VI </linkedimage> |
Methods
Methods | <linkedimage>
img_src=Image:CCT_GetSessions.png wikipage=Code_Capture_Tool#Create_CCT_Instance </linkedimage> |
<linkedimage>
img_src=Image:CCT_Capture_icon.png wikipage=Code_Capture_Tool#Capture_Image </linkedimage> |
<linkedimage>
img_src=Image:CCT_SaveImage.png wikipage=Code_Capture_Tool#Save_Image </linkedimage> |
<linkedimage>
img_src=Image:CCT_CopyToClipboard.png wikipage=Code_Capture_Tool#Copy_to_Clipboard </linkedimage> |
<linkedimage>
img_src=Image:CCT_CloseSession.png wikipage=Code_Capture_Tool#Destroy_CCT_Instance </linkedimage> |
<linkedimage>
img_src=Image:CCT_GenerateFileName.png wikipage=Code_Capture_Tool#Generate_File_Name </linkedimage> |
---|
These VIs are used to activate methods for the CCT.
Create CCT Instance
This VI must be called for every instance of the CCT, it creates a GOOP dataspace that will contain the data of the instance. Calling this VI must be done with a valid VI reference.
Capture Image
This VI will apply the current settings and store the captured image in the CCT instance, additionally it returns the image itself.
Save Image
This VI will save the image to the path specified by a folder and filename stored in the CCT instance.
Copy to Clipboard
This VI will store the data specified by the clipboard settings to the clipboard.
Destroy CCT Instance
This VI must be called to close the CCT Instance and will free up used memory resources.
Generate File Name
This VI will generate a default filename based on the captured parts and VI name. This filename will not be stored inside the CCT session.
Set properties
Set properties | <linkedimage>
img_src=Image:CCT_SetFP.png wikipage=Code_Capture_Tool#Set_Front_Panel_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetBD.png wikipage=Code_Capture_Tool#Set_Block_Diagram_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetLayout.png wikipage=Code_Capture_Tool#Set_Layout_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetClipboard.png wikipage=Code_Capture_Tool#Set_Clipboard_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetVI.png wikipage=Code_Capture_Tool#Set_VI_Ref </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetFolder.png wikipage=Code_Capture_Tool#Set_Folder </linkedimage> |
<linkedimage>
img_src=Image:CCT_SetFileName.png wikipage=Code_Capture_Tool#Set_Filename </linkedimage> |
---|
These VIs are used to change properties for the CCT instance.
Set Front Panel Mode
This VI will change the current front panel capture mode.
Set Block Diagram Mode
This VI will change the current block diagram capture mode.
Set Layout Mode
This VI will change the current layout orientation.
Set Clipboard Mode
This VI will change the current clipboard mode.
Set VI Ref
This VI sets the reference of the VI that needs to be captured
Set Folder
This VI will change the folder where the images will be saved.
Set Filename
This VI will change the filename of the stored image.
Get properties
Get properties | <linkedimage>
img_src=Image:CCT_GetFP.png wikipage=Code_Capture_Tool#Get_Front_Panel_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetBD.png wikipage=Code_Capture_Tool#Get_Block_Diagram_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetLayout.png wikipage=Code_Capture_Tool#Get_Layout_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetClipboard.png wikipage=Code_Capture_Tool#Get_Clipboard_Mode </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetVI.png wikipage=Code_Capture_Tool#Get_VI_Ref </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetFolder.png wikipage=Code_Capture_Tool#Get_Folder </linkedimage> |
<linkedimage>
img_src=Image:CCT_GetFileName.png wikipage=Code_Capture_Tool#Get_Filename </linkedimage> |
---|
These VIs are used to retrieve properties from the CCT instance.
Get Front Panel Mode
This VI will read the current front panel capture mode.
Get Block Diagram Mode
This VI will read the current block diagram capture mode.
Get Layout Mode
This VI will read the current layout orientation.
Get Clipboard Mode
This VI will read the current clipboard mode.
Get VI Ref
This VI returns a reference to the that is currently captured in this isntance
Get Folder
This VI will read the folder where the images will be saved.
Get Filename
This VI will read the filename of the stored image.
Support
Support | <linkedimage>
img_src=Image:CCT_CaptureFP.png wikipage=Code_Capture_Tool#Capture_Front_panel </linkedimage> |
<linkedimage>
img_src=Image:CCT_CaptureBD.png wikipage=Code_Capture_Tool#Capture_Block_diagram </linkedimage> |
<linkedimage>
img_src=Image:CCT_ShowGUI.png wikipage=Code_Capture_Tool#Show_CCT_GUI </linkedimage> |
<linkedimage>
img_src=Image:CCT_70Container.png wikipage=Code_Capture_Tool#7.0_container_VI </linkedimage> |
<linkedimage>
img_src=Image:CCT_80_Container.png wikipage=Code_Capture_Tool#8.0_container_VI </linkedimage> |
---|
This submenu shows additional low level functions of the CCT.
Capture Front panel
Use this VI to have direct access to the capturing of a front panel.
Capture Block diagram
Use this VI to have direct access to the capturing of a block diagram.
Show CCT GUI
Use this VI to show the user interface of the CCT.
7.0 container VI
Use this VI if you want to build a source distribution or an executable and need to make sure all dynamic VIs are included. For LabVIEW 7.0 and up.
8.0 container VI
Use this VI if you want to build a source distribution or an executable and need to make sure all dynamic VIs are included. For LabVIEW 8.0 and up, don't forget to include the 7.0 container.
Known issues
Description | Status |
---|---|
After using a non-default path and resetting it to the default, the new setting (temp) is not used | Solved in version 1.0 |
Installing on Linux fails due to case sensitivity | Solved in version 1.0 |
Capturing a non-visible part on a multi-pane front panel fails | A limitation due to the LabVIEW implementation of panes, most-likely not fixable |
Saving an empty image returns an error | Solved in version 1.0 |
Opening the CCT from the Getting Started Window locks up LabVIEW | Solved in version 1.0 |
Possible High use of memory | Investigating |
Impossible to capture FP of locked VI | Investigating |
Version History
Version 1.0.0
Release date 27 February 2008
- Bug-fixes
- Support for panning of the preview
Version 0.9.1
Release date 7 November 2007
Support for LabVIEW 7.x and up
Support for all OS'es
Support for orientation
Support for selection
Support for customized naming
Support for customized folder
Licensing
The CCT is licensed under the BSD license