LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

"print" command in Mathscript not saving plots in BMP format!

Solved!
Go to solution

Hi guys,

 

i am trying to create a vi that will automatically generate a pdf report for my project. I found a way to save the report directly as pdf (that is, i "print" my report to a virtual PDF printer (PDFCreator) that saves the file automatically to a specific folder with the date/time as its name. So this was the first step to making the procedure automatic).

 

I am stuck in the next level, which is adding to the report not labview's bad-looking graphs, but the plots generated through the Mathscript.

So, after adding as input "a" my data to the mathscript node, i use the following commands:

 

figure

plot(a)

print image

 

Now, what this sequence does is make a nice plot of my data and then save it as "image.eps" in the default folder.


However, the eps format is not at all useful to me as i cannot import the plot with the "Append Image To Report.vi". This vi supports only BMP, GIF, WMF, EMF and JPG formats.

So, i want to save the plot from mathscript as BMP. This is supposedly possible, however i have not been able to find a way. The "print" command help for Labview 2011 Mathscript reads:

 

http://zone.ni.com/reference/en-XX/help/373123B-01/lvtextmath/msfunc_print/

 

Syntax

print

print(a)

print(file)

print(a, file)

Description

Print the plot window or save it into a file in either BMP or EPS format. If the plot window to save is an image plot or a 3D plot, the file must be in BMP format. For other kinds of plots, both BMP and EPS formats are supported.

 

 

There is no way for me to choose which format i want and it automatically chooses eps. If i use the command

print image.bmp


it gives me back an error. So, adding the .bmp ending is not the way to go.

 

 

All in all, it is crucial for me to export the plot in BMP format (so as to import it in the report generation), but i cannot find a way, althouth it is supposed to work.

Any ideas????

 

Thanks

 

PS. I run Labview 2011 SP1

0 Kudos
Message 1 of 3
(6,559 Views)
Solution
Accepted by topic author paliabelo

Hi,

 

You should use the following command

print('test.bmp')

 instead of

print test.bmp

 

Message 2 of 3
(6,532 Views)

Thanks a lot ttrr!! 🙂

0 Kudos
Message 3 of 3
(6,525 Views)