Pulsonix User Forum

Technical advice from Pulsonix engineers and the wider community.

Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help with using Pulsonix
 Scripting
 PlotWriter Pathing
Author Previous Topic Topic Next Topic  

HarryHirn

Germany
26 Posts

Posted - 29 Aug 2017 :  09:55:46  Show Profile  Reply with Quote
Hi,

i am trying to plot from a script but for me the PlotWriter() seems to behave not like described in the documentation.

I want to put the plots in a specific folder.

My script:


var Design = ActiveDocument();
 if (Design) {
     var PlotWriter = Design.NewPlotWriter();
     if (PlotWriter) {
         PlotWriter.WriteDevicePlots('PDF', 'Test/');
     }
 }


I get the following warning:
"File Test/Design1_.pdf is locked"

The Folder "Test" does not appear on my computer.

Changing the script to


 var Design = ActiveDocument();
 if (Design) {
     var PlotWriter = Design.NewPlotWriter();
     if (PlotWriter) {
         PlotWriter.WriteDevicePlots('PDF', '/Test/');
     }
 }


Produces a folder one level above.

expected:
D:/Pulsonix/Test/Design1_.pdf

reality:
D:/Test/Design1_.pdf


Changing the script to:


 var Design = ActiveDocument();
 if (Design) {
     var PlotWriter = Design.NewPlotWriter();
     if (PlotWriter) {
         PlotWriter.WriteDevicePlots('PDF', '../Test/');
     }
 }


Produces the folder
D:/Pulsonix/Test

but there is only the Design1(CAMPlot).txt report.

For me the folder relative path is wrong, it doesnt behave like in the documentation.

Am i missing something?

Edited by - HarryHirn on 29 Aug 2017 09:57:09

psxforum

United Kingdom
66 Posts

Posted - 29 Aug 2017 :  10:58:16  Show Profile  Reply with Quote
I have tried the examples you show, and it seems to me that the application is trying to place the output file relative to what it considers to be the 'current' folder rather than the folder in which the design file exists.

I can get it to work fine by specifying a full rather than relative path, but of course that is not what you require as you want your output file to be placed relative to the location of the design file.

I will log this on our support database to be investigated and fixed.

David.
Go to Top of Page

steve

United Kingdom
316 Posts

Posted - 29 Aug 2017 :  11:30:08  Show Profile  Reply with Quote
Logged as 43104.

Pulsonix Assistance
Go to Top of Page
  Previous Topic Topic Next Topic  
Jump To: