Warning 36: File error in disini when I call metafl("wmf")

301 views
Skip to first unread message

Diane

unread,
May 21, 2013, 1:31:05 PM5/21/13
to dislin...@googlegroups.com
Hi, I wonder if anyone can help me.
 
I am a relatively new c++ and dislin user so I might have missed something simple.
 
I can sucessfully generate a plot on screen using metafl("xwin"), but cannot generate any files in wmf, tiff or pdf formats.
 
Here are the methods I am calling:
 

Dislin plot;

//Level 0

plot.metafl ("wmf");

plot.wmfmod ("standard", "format");

plot.setfil ("filename.wmf");

plot.scrmod ("revers");

plor.setpag ("usal");

plot.disini ();

//Level 1

plot.filmod ("count");

plot.pagera ();

plot.winfnt("arial");

plot.graf (xa, xe, xor, xstp, ya, ye, yor, ystp); // these are all set integer values, but I shan't bore you with the details

//Level 2

plot.curve (float* xray1, float* yray1, int n1);

plot.endgrf ();

//Level 1

plot.disfin ();

//Level 0

plot.symfil ("xwin", "keep");

Here are the warnings:

Warning 36: File error in disini!

Warning 3: Incorrect level in pagera! < 0>

Warning 3: Incorrect level in winfnt! < 0>

Warning 3: Incorrect level in graf! < 0>

Warning 3: Incorrect level in curve! < 0>

Warning 3: Incorrect level in endgrf! < 0>

Warning 3: Incorrect level in disfin! < 0>

Warning 21: The routine must be called after disini in symfil!

No file is saved to my workspace.

Same outcome for pdf, tiff, etc.

 

Thanks in advance,

Diane

Rauthe-Schöch, Armin

unread,
May 21, 2013, 2:37:05 PM5/21/13
to dislin...@googlegroups.com
Hi Diane,

I would change the order of the calls like this:

Dislin plot;

//Level 0

plot.scrmod ("revers");

plor.setpag ("usal");
plot.filmod ("count");


plot.metafl ("wmf");

plot.wmfmod ("standard", "format");

plot.setfil ("filename.wmf");



plot.disini ();

//Level 1

plot.pagera ();

plot.winfnt("arial");


plot.graf (xa, xe, xor, xstp, ya, ye, yor, ystp); // these are all set integer values, but I shan't bore you with the details

//Level 2

plot.curve (float* xray1, float* yray1, int n1);

plot.endgrf ();

//Level 1

plot.disfin ();

//Level 0

plot.symfil ("xwin", "keep");


--
Dr. Armin Rauthe-Schöch
Max Planck Institute of Chemistry
Air chemistry department, AG Brenninkmeijer
Hahn-Meitner-Weg 1
D-55128 Mainz
Germany
Tel. +49-(0)6131-305-4123
Fax +49-(0)6131-305-4009


From: dislin...@googlegroups.com [dislin...@googlegroups.com] on behalf of Diane [diane.s...@gmail.com]
Sent: Tuesday, May 21, 2013 19:31
To: dislin...@googlegroups.com
Subject: Warning 36: File error in disini when I call metafl("wmf")

--
You received this message because you are subscribed to the Google Groups "dislin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Helmut Michels

unread,
May 22, 2013, 3:27:11 AM5/22/13
to dislin...@googlegroups.com
Hi Diane,

The error message 'Warning 36: File error in disini!'
means that disini cannot create the file 'filename.wmf'. The other warnings are consequential
errors. Are you running your program from a directory, where you don't have the right
to create files?

Best regards,

Helmut

 

Diane

unread,
May 22, 2013, 5:03:15 AM5/22/13
to dislin...@googlegroups.com
Thank you both!
 
Dr Rauthe-Schoch: Good suggestion, didn't clear the warnings, though I agree with your order and will keep it.
 
Helmut: You're absolutely right, for some reason I can no longer write to a file in my working directory. I have no idea why.
 
So it isn't a Dislin issue.
 
Thanks!
 
Kind regards,
Diane

Diane

unread,
May 22, 2013, 5:53:43 AM5/22/13
to dislin...@googlegroups.com
Solved! It was a working directory problem. The working directory was inherited from a previous solution. Once I set the directory within the script, everything worked beautifully.`
 
Thank you for your help and also for such a fantastic plotting library!!
 
Kind regards,
Diane
Reply all
Reply to author
Forward
0 new messages