Determine if user presses cancel in print(g,'-dsetup')

I want to run a print command from a script, but first I want to run the setup [print(g,'-dsetup')]. But if the user presses cancel in the setup window, I want to cancel the print command. I don't know how to do that. There doesn't seem to be any return message from the print setup command. Suggestions?

Answers (1)

Would printdlg(g) work? The user can set up options. Then, if "Ok" is clicked, the figure is printed. if "Cancel" is clicked, nothing happens.

Categories

Products

Asked:

on 17 May 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!