BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW-compatible Clipboard Manager?

Dear colleagues,

do you know any clipboard manager, which can hold LabVIEW code? I mean - if I will copy some code from Block Diagram, then close LabVIEW, then open again and paste, then copied code will be pasted as BD Code and not as an image? In ideal case I shall be able to copy between different LabVIEW instances (from lower to higher LV version).

 

0 Kudos
Message 1 of 6
(2,591 Views)

The data to be copied is held in LabVIEW, so a manager that can do that needs to be infinitely aware of LabVIEW, and probably made in LabVIEW.

 

Copying between versions is going to be extra hard. Without that requirement, you could store the clipboard VI (that LV uses to store the clipboard) to a buffer. But if you want to be compatible between versions, you'd need to serialize that data and de-serialize it. 

 

So, it won't be easy.

 

Closest I got to this was a multi-clipboard for LabVIEW, that could hold (and display) a history of copy items (not just LV). Then you could paste them at will, either in order or by selecting one from history. But it was a delicate balance between Window and the project provider framework. I never actually used it...

0 Kudos
Message 2 of 6
(2,540 Views)

I would expect that you could use the CCT API to create a save to clipboard tool.  Up version should be automatic down convert would require a save for setting parameter.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 6
(2,451 Views)

@JÞB wrote:

I would expect that you could use the CCT API to create a save to clipboard tool.  Up version should be automatic down convert would require a save for setting parameter.


The Cognitive Computing Toolkit (CCT)?

The Communication Control Toolkit (CCT)?

 

Saving LabVIEW's internal clipboard to anything will be the hardest trick, whichever solution is chosen. This does require code in LabVIEW or changes to LabVIEW. There's just no way any external entity can get LabVIEW's internal clipboard (except maybe through a VI Server reference to the running LabVIEW instance, which technically would be LabVIEW code). 

0 Kudos
Message 4 of 6
(2,428 Views)

Code Capture Tool, sorry I didn't disambiguate the acronym.

 

LabVIEW does have some methods that copy to Windows Clipboard.  The right-click option on graphs is one example.  I do not know how this method works.   But, some pointed questions to NI R&D might be an option for Champions. 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 6
(2,407 Views)

@JÞB wrote:

Code Capture Tool, sorry I didn't disambiguate the acronym.

 

LabVIEW does have some methods that copy to Windows Clipboard.  The right-click option on graphs is one example.  I do not know how this method works.   But, some pointed questions to NI R&D might be an option for Champions. 


I know how it works 😋.

 

Access to the clipboard is pretty straightforward, except when it comes to LabVIEW code.

 

LabVIEW code isn't copied to the Windows clipboard, but in stead is copied to a Clipboard VI. Several formats are copied to the Windows clipboard: an image, or text and a LabVIEW tag. But not the code... 

 

So if you paste in LabVIEW, it can see there's a LabVIEW format (by the tag), and LabVIEW then takes the data from the clipboard VI (not the clipboard), and pastes it.

 

If you paste between 2 LV instances (same version) the source pastes an image and it's tag, and the destination simply pastes the image as it doesn't recognize the tag...

 

So if you want to copy\paste LabVIEW code, you need to catch a LabVIEW copy action (the Selection Change event on the Clipboard VI might work), somehow put the Clipboard VI data into the Windows clipboard, and when pasting, move the data from the Windows clipboard into the clipboard VI before LabVIEW pastes it.

 

All doable, but tricky.

0 Kudos
Message 6 of 6
(2,382 Views)