Revit API Print To PDF save as dialog box

Revit API Print To PDF save as dialog box

Anonymous
Not applicable
3,681 Views
4 Replies
Message 1 of 5

Revit API Print To PDF save as dialog box

Anonymous
Not applicable

I am developing an addin to print PDF from Revit With Custom File Name. I using Document.print() meathod to print selected views. I am having an issue with Save AS dialog box. With each print I have to press save.

This is not form Revit, How can I bypass this or not to show this dialog box? Untitled.jpg

0 Likes
Accepted solutions (1)
3,682 Views
4 Replies
Replies (4)
Message 2 of 5

Joe.Ye
Alumni
Alumni

 

Hello

 

Maybe you can use the DialogBoxShowing event to dismiss the SaveAs dialog. I didn't try, not quite sure.

 

Hope the article in the DevBlog helps you get the diea.

Dismiss the dialog when opening a copied central model file

http://adndevblog.typepad.com/aec/2013/06/dismiss-the-dialog-when-opening-a-copied-central-model-fil...

 

You man need to change the passed in dialog type, and also the DialogId.

 



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes
Message 3 of 5

Anonymous
Not applicable

Thanks Joe,

Ddidn’t have much luck. Doses’t work for me.

0 Likes
Message 4 of 5

Anonymous
Not applicable
Accepted solution

That dialog box is coming from PDF995.  You'll need to change the PDF995 settings so that it doesn't prompt you to pick a file location every time.  In pdfEdit995, under the Auto-Name tab, select "Automatically name the document..."

Unfortunately when you let PDF995 automatically name the file, it ignores the filename you've specified in Revit.

I've gotten around this by directly manipulating the PDF995.ini file for every sheet that is printed.

Message 5 of 5

Joe.Ye
Alumni
Alumni

 

I tried to use the event to dismiss the pdf print SaveAs dialog. It failed as your test result. 

DialogboxShowing event can only be used to monitor Revit's own dialog box showing. 

From Revit API side, no API can dismiss this dialog.

 

This is a setting of the Pdf print driver. You can look for the articles how to prevent the SaveAs dialog.



Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
0 Likes