Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Print or Save WaveFormGraph

Is there any example about printing the "picture" of a waveformGraph( and eventually scatterGraph)?  I try to find a better way than "making the PlotAreaColor to white, then alt-Printscreen, then cut in MSpaint and finaly copy to MSword".. and I have no idea how to do that..
 
 
0 Kudos
Message 1 of 10
(4,937 Views)
There is a printing shipping example that demonstrates this. You can find it under the following folders, depending whether you are using VS2003 or VS2005.

C:\Program Files\National Instruments\MeasurementStudioVS2005\DotNET\Examples\UI\Graph\Printing
C:\Program Files\National Instruments\MeasurementStudioVS2003\DotNET\Examples\UI\Graph\Printing

Bilal Durrani
NI
0 Kudos
Message 2 of 10
(4,917 Views)

How to save it ?There is no examples!!

0 Kudos
Message 3 of 10
(4,305 Views)

VisualBasic,

 

In the current version of Measurement Studio, the example is located at: C:\Users\Public\Documents\National Instruments\MStudioVS2010\DotNET\Examples\UI\WindowsForms\Graph\Printing\vb.

 

You could also use the ToFile() method of the waveform graph, as mentioned in this other forum thread: http://forums.ni.com/t5/Measurement-Studio-for-NET/saving-graph-as-image/td-p/1115427

 

Hopefully the example or that ToFile() method will work for you--let us know if you need any more assistance!

0 Kudos
Message 4 of 10
(4,297 Views)

Thanks!It is great.But how can I save my data as .txt?

0 Kudos
Message 5 of 10
(4,282 Views)

VisualBasic,

 

You'll need to format the data and save it as a .txt file. Here's a DeveloperZone article on building a Measurement Studio application that acquires data and logs it to a file--specifically, you'll be interested in the section on Adding Logging Functionality: http://www.ni.com/white-paper/3633/en#toc7

 

I hope that helps, and let us know if you need any more assistance!

0 Kudos
Message 6 of 10
(4,265 Views)

Can you show me this in visual Basic.NET ?For example VB2010

I get this error @_{7@}H6)91RV%S]`{GE`R0.jpg

0 Kudos
Message 7 of 10
(4,247 Views)

Hey VisualBasic,

 

Check out the Measurement Studio example found at Examples > DAQmxWithUI > AnalogDataFileProcessor. That code is an example of how to write DAQmx data to a file and also how to read it back and display it.

 

As for your exception, it sounds like at this point in your code, savedData has not been declared or assigned. Are you sure that you put something in savedData before calling that function?

0 Kudos
Message 8 of 10
(4,228 Views)

In this example,the data is saved as .adf.How can I save it as .txt?Please help me!!

0 Kudos
Message 9 of 10
(4,211 Views)

Hi Visual Basic,

 

Have you looked at the link that Daniel posted above? It specifically describes logging data to a .txt file in Visual Basic.

 

Writing text files is not unique to Measurement Studio; you can find help on writing text files in Visual Basic on the MSDN website here: http://msdn.microsoft.com/en-us/library/1t4kyezf(v=vs.80).aspx.

 

As Daniel said, you have to format your data into text that can be written to a text file. 

 

Regards,

 

Alexandra 

National Instruments
Applications Engineer
0 Kudos
Message 10 of 10
(4,189 Views)