Issue with DVHExport.cs CSV file

Nov 28, 2016 at 5:29 PM
Hello Varian Developers,

I have ran into an issue any time I try to export a .csv file with DVH information. I am trying to create a plugin that allows an RT to perform QA on an External Beam plan, based on constraints that are defined given the site of treatment.

Initially I built my own plugin, but I couldn't get the .csv file to write. I tried several different ways to declare and use a StreamWriter, all coming from either the MSDN or StackOverflow, so I don't think that's the issue. I have even tried saving it to several different directories specified under the Environment.SpecialFolder enum, as these are "special" because there is often access granted to them. We are running Eclipse through a Citrix environment on most computers in the center, so I tried running the plugin on a computer that has it locally installed, and got an empty text file instead of nothing. I found the DVHExport.cs file in Developer Workshop 2.0\hands-on exercises\exercise 1\Eclipse Scripting API\Plugins and tried running that as I assumed the source code given here must work, but the same thing occured.

This leads me to believe that maybe there is some permission error going on. We have been able to write to the Temp folder using a standalone executable, so I wonder if the issue comes from Eclipse trying to write the file. Anyways, just wondering if anyone has experienced a similar issue or if there are any ideas.

Thanks!
Dec 2, 2016 at 12:22 AM
Hi cmckay,

I'm not sure if this is relevant to your issue, but I'm wondering if you can test this out by trying to save the csv file to a share that maybe you do have control over. I got a question from someone today regarding saving files through ESAPI to location outside of the Eclipse environment and it seemed to work pretty well. I found this syntax on Stack Overflow:
using(StreamWriter sw = new StreamWriter("\\\\<servername>\\folder\\file.csv")
{
    //put your code to write the file here
}
Hope this helps!
Dec 5, 2016 at 11:53 PM
Hi mcschmidt,

Looks like it has no issue writing to the shared drive! I will have to discuss with my supervisor to see how feasible this will be as a location, but thank you very much for the suggestion.