LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary File from Database to .rtf in .Net control

I have one vi where I save a .rtf file to a database like so:

Later, I get the file from the database and save it as an .rtf before I open it with another vi (rtf viewer.vi😞

However, Although rtf viewer.vi will work with files that are not uploaded to the database, it cannot read these files. Opening a file in Notepad++ gets me the following:

Ā؀萀ĀĀ ᄠĀ
�{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}
{\f1\froman\fprq2\fcharset2 Symbol;}} \viewkind4\uc1\pard\sa160\sl252\slmult1\b\f0\fs22
Known Issues:\par \pard\fi-360\li720\sa160\sl252\slmult1\b0\f1\'b7\tab\f0 VI Displays no error
when "Print." is Selected with no printer attached\par \f1\'b7\tab\f0 Arduino driver does not
currently initialize with startup\par \pard\sa160\sl252\slmult1\b Improvement Points:\par \pard\fi-
360\li720\sa160\sl252\slmult1\b0\f1\'b7\tab\f0 Time numeric constants are listed in numeric format time
format\par \f1\'b7\tab\f0 Does not support test steps longer than 50 days\b\par
\pard\sa160\sl252\slmult1
Change Log:\par \pard\fi-360\li720\sa160\sl252\slmult1\b0\f1\'b7\tab\f0
[Date] Fixed Issue with Results Display - JLS\par \f1\'b7\tab\f0 [Date] Added Arduino Control -
JLS\par }

I can see that the data appears to be there in the file. I'm not sure what I need to do though to get the data back into RTF format.

0 Kudos
Message 1 of 3
(2,682 Views)

What happens if you convert the Variant to String before saving the temporary rft?

/Y

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,671 Views)

@Yamaeda wrote:

What happens if you convert the Variant to String before saving the temporary rft?

/Y

 


In LabVIEW, the data becomes readable from the string as this text: (Which won't Ctrl+C _> Ctrl+V for some reason)

However, the file turns into total jibberish in notepad ++ but it DOES Ctrl+C Ctrl+V to:

  Ø{ \ r t f 1 \ a n s i \ a n s i c p g 1 2 5 2 \ d e f f 0 \ d e f l a n g 1 0 3 3 \ d e f l a n g f e 1 0 3 3 { \ f o n t t b l { \ f 0 \ f s w i s s \ f p r q 2 \ f c h a r s e t 0   C a l i b r i ; } { \ f 1 \ f r o m a n \ f p r q 2 \ f c h a r s e t 2   S y m b o l ; } } 
 
 \ v i e w k i n d 4 \ u c 1 \ p a r d \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1 \ b \ f 0 \ f s 2 2   K n o w n   I s s u e s : \ p a r 
 
 \ p a r d \ f i - 3 6 0 \ l i 7 2 0 \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1 \ b 0 \ f 1 \ ' b 7 \ t a b \ f 0   V I   D i s p l a y s   n o   e r r o r   w h e n   " P r i n t . "   i s   S e l e c t e d   w i t h   n o   p r i n t e r   a t t a c h e d \ p a r 
 
 \ f 1 \ ' b 7 \ t a b \ f 0   A r d u i n o   d r i v e r   d o e s   n o t   c u r r e n t l y   i n i t i a l i z e   w i t h   s t a r t u p \ p a r 
 
 \ p a r d \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1 \ b   I m p r o v e m e n t   P o i n t s : \ p a r 
 
 \ p a r d \ f i - 3 6 0 \ l i 7 2 0 \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1 \ b 0 \ f 1 \ ' b 7 \ t a b \ f 0   T i m e   n u m e r i c   c o n s t a n t s   a r e   l i s t e d   i n   n u m e r i c   f o r m a t   t i m e   f o r m a t \ p a r 
 
 \ f 1 \ ' b 7 \ t a b \ f 0   D o e s   n o t   s u p p o r t   t e s t   s t e p s   l o n g e r   t h a n   5 0   d a y s \ b \ p a r 
 
 \ p a r d \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1   C h a n g e   L o g : \ p a r 
 
 \ p a r d \ f i - 3 6 0 \ l i 7 2 0 \ s a 1 6 0 \ s l 2 5 2 \ s l m u l t 1 \ b 0 \ f 1 \ ' b 7 \ t a b \ f 0   [ D a t e ]   F i x e d   I s s u e   w i t h   R e s u l t s   D i s p l a y   -   J L S \ p a r 
 
 \ f 1 \ ' b 7 \ t a b \ f 0   [ D a t e ]   A d d e d   A r d u i n o   C o n t r o l   - J L S \ p a r 
 
 } 
 
   
0 Kudos
Message 3 of 3
(2,657 Views)