LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

APP_COPY Menu Behavior

Is there a way to configure the APP_COPY menu action to NOT alter the data during the copy process. The data in the indicator has "\r\n" as the line terminators. If I use the APP_COPY function of the menus it removes all of the "\r" from the data. I do not want the data altered. Is there a way to prevent this from happening. BTW, if I directly write the contents of the indicator to a file the data remains unaltered.

 

In the work I am doing I need to preserve the data as is without any modifications and the copy functionality is not allowing me to do this.

 

I should note that the copy/paste within LabVIEW itself leaves the data unmodified. That is a copy from an indicator to a control in the development environment leaves the data unmodified. If copied using the APP_COPY method the newlines (and possibly other characters) are modified.

 

Any thoughts?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 1 of 5
(2,287 Views)

I can not give any answer but maybe a clue.

 

I seem to have Rolf assocaited with some trivia in my head that says LV deals with the clip-board in more than one way. One method for working within LV and the other way to be compatable with the platform you are running on.

 

He may have been explaining why we can't copy-n-paste images with transparency when I read that post.

 

So...

 

Try searching on Rolf and copy to see if you can find that rather old thread.

 

Doing what little i can to help out,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 5
(2,274 Views)

Why not try to implement the copy operation in your VI? Just use a user menu item instead/ Or do you want to have generic copy operation from any LabVIEW control? Even then finding the key focus of the current control should allow you to do that.

 

I think your problem arises out of the fact that LabVIEW maintains in fact a two level clipboard approach. It uses in the first place an internal hidden Window as clipboard manager that can hold any type of LabVIEW data that you can imagine. When you copy a bunch of diagram code you usually want LabVIEW to place the code into your other diagram, not a picture of the code. To copy that into the OS type clipboard would be cumbersome, since LabVIEW would need to convert the data into a format that can be placed into that clipboard when it can do the same in its own private clipboard manager without any need to convert data in a form that can be shared with the system, even if the data is private and therefore highly unusable for anyone but itself, including other LabVIEW versions. So as long as the data stays inside the LabVIEW clipboard, no alteration will happen. LabVIEW only posts some info to the system clipboard that it has actually some data availalable should someone ask for it and the system requests that data when the need arises. Now LabVIEW does the conversation, from LabVIEW code to bitmap, from string data to system strings, etc.

 

That explains why copying inside LabVIEW will not alter the data, while copying to outside of LabVIEW will. I know of no way to alter this conversion process in any way, other than circumventing it altogether and copying yourself whatever you need to copy into the system clipboard.

Rolf Kalbermatter
My Blog
Message 3 of 5
(2,257 Views)

Thank you Rolf!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 5
(2,250 Views)

Thanks. I will replace the APP_COPY with our own copy. I have implemented my own copy in the past but we went with the APP_COPY on this application since multiple string indicators were involved. It shouldn't be too tough to put some intelligence into our own copy to pick the correct indicator to grab the data from.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 5 of 5
(2,239 Views)