‎01-10-2013 06:33 AM
Hi,
I use the example from your web site : http://zone.ni.com/devzone/cda/epd/p/id/798.
I want use the "ReadToFile" command, but I don't find this command in this example.
My goal is to capture the screen to a file.
Please, could you help me?
Thanks
Gilles
‎01-10-2013 09:11 AM
Where is this command supposed to come from? Excel? What screen are you talking about?
‎01-10-2013 09:46 AM
Hi Dennis,
I saw the "readToFile" command in the NI doc ( http://digital.ni.com/public.nsf/allkb/37E8AC1DCD69A0D5862571410083C194 )
"Screen" is the screen of my instrument (spectrum analyser).
For information, it is a old instrument and I want to capture the screen without old moving disk (3'1/2).
Regards
Gilles
‎01-10-2013 10:04 AM
The function viReadToFile is documented in the NI-VISA Help. You certainly do not need that in your vba code. You can read from the instrument to a buffer and then write to a file with a vba function. The function is simply a one step process instead of two. If you want to try the function, I would suggest you use VISA commands for everything. I think the example vba code uses nothing but lower level GPIB commands.
Your first task, however, is determining if there is a command to print the screen, then if there is a command to print the screen to the GPIB port instead of a floppy.
‎01-10-2013 10:36 AM
I agree : I managed to read from the instrument to a buffer and write to a file (*.wmf) but when i want to open it, it fail.
My first error was to define a too small buffer.
Now I think that my instrument didn't send the whole file (it seems truncated). I asked help to the instrument supplier, I'm waiting its answer.
I don't find a command to print the screen to the GPIB port. This "screen capture" command creates a wmf file in the "c:\" internal disk.
Thanks for your help.