LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Invoke Node and clipboard methods

I have encountered a very useful vi that allows me to obtain an image from the clipboard by using an invoke node with the clipboard.get image method.  As I was experimenting with this, I attempted to place an invoke node and selecting the clipboard.get image method.  Clicking the invoke node gives me three methods: empty (after enabling scripting), read from clipboard and write to clipboard.  I could not find get image anywhere.  How do I select this method on a newly placed invoke node?

 

Part 2: Given that this method seems to be hidden from me, how can I learn about other "hidden" methods?

 

 - les

 

0 Kudos
Message 1 of 13
(4,498 Views)

Clipboard.GetImage is a private method.  This usually means it was developed for a specific internal LabVIEW use, but was not made stable enough for general use, and may crash LabVIEW under common circumstances.

 

Given the major differences between clipboard implementations between the operating systems LabVIEW supports, it does not surprise me that this is a private method.  However, some methods are marked private when they really do not need to be.  You already have a copy of it, so can use it when you need it (just copy and paste).  I will find out if it is a stable function or not and see if its status can be changed.

Message 2 of 13
(4,489 Views)

 


Les Bartel wrote: 

Part 2: Given that this method seems to be hidden from me, how can I learn about other "hidden" methods?


Prior to LabVIEW 2010 these were known under the general heading of scripting. LabVIEW 2010 exposed these, and can be made visible via a setting in the LabVIEW options dialog. For prior versions see here: http://lavag.org/topic/1875-vi-scripting-readme-first/

 

0 Kudos
Message 3 of 13
(4,482 Views)

I made inquiries and it appears the method is safe for general use.  Here is a VI (LabVIEW 2009) encapsulating it to use until we get it on the public list.

Message 4 of 13
(4,433 Views)

Is there any way that we could view your block diagram so that I can learn to use it for my own programs?  Or at least tell me where to find the "hidden" parts so I can create my own.  Thanks.

0 Kudos
Message 5 of 13
(4,319 Views)

The block diagram is simply an Invoke node with the Clipboard.Get Image method.  All inputs and outputs are routed to the front panel and connector pane, so you are not missing any functionality.

 

Since it is a private function, I can not release it without locking the block diagram.  Private functions are just that, functions that are not exposed to our customers, usually due to insufficient development time or testing.  I have crashed LabVIEW, corrupted my LabVIEW installation, and corrupted a huge hierarchy of VIs using private functions, so they must be approached with extreme caution, even internally.  This particular function has been certified safe, so I was able to release an encapsulated version of it.  However, you will not be able to find it in the development environment until it is officially released. 

0 Kudos
Message 6 of 13
(4,292 Views)

Thank you for the reply.  I total understand the reasoning behind it.  I was able to recreate my own function that does what I need using the Clipboard.GetImage - I was just trying to save myself some time.  😉  

0 Kudos
Message 7 of 13
(4,290 Views)

Like prior incarnations of Clipboard.GetImage that I've tried in the past, this doesn't seem to work once built into an executable.  Can anyone confirm that this is expected, and if so, why?

0 Kudos
Message 8 of 13
(4,255 Views)

I would guess that until the method is released as public it may not work in all scenarios.  Which development environments were you able to reproduce this behavior with?

Scott A
SSP Product Manager
National Instruments
0 Kudos
Message 9 of 13
(4,218 Views)

I noticed today that when I compiled it into an executable that I was getting errors.  I didn' t have time to pin point if it was from the Clipboard.GetImage method, but it did come from something inside my image-related VIs.

 

I am using LabVIEW 2010 SP1.

0 Kudos
Message 10 of 13
(4,210 Views)