As near as I can tell, Export
cannot be configured through arguments or options, to present a standard system file save dialog to the user, so that he can specify a location and name for his file. Instead, it seems to require that these parameters be specified as arguments. One way around this is to use SystemDialogInput
Export[SystemDialogInput["FileSave"], ...]
which works fine in simple cases, but in more complex cases, such as the ones I need it for, this fails silently. In particular, I can't get it to work with Show
:
Manipulate[f = Plot[Sin[x], {x, 0, Pi}],
Row[{Button[
"Export", {Export[SystemDialogInput["FileSave"], Show[f], "PDF"]},
ImageSize -> 100, Alignment -> {Center, Baseline}]}]]
Strangely, this works fine if, instead of using Export
, a file is specified as an argument.
Why doesn't Export
+ SystemDialogInput
work with Show
?