我已经成功创建了一个程序来创建PDF文件,而无需重新格式化文件名(Revit去掉点并放入破折号,并在整个模型中为文件名加前缀名称)。但是,一旦PDF被“创建”,它仍然移植到Bluebeam Revu(REAL保存到文件的位置)。如何让Revit在指定的文件夹中创建具有指定名称的文件,而无需调用Bluebeam“中介”对话框?如何在打印PDF时不使用Bluebeam打开revu PDF的
//this is my code as written....
string PDF_Path = "C:\\Revit Local\\" + Each_Sheet + " - " + Each_Name + ".pdf";
IPrintSetting PDF_Sets = PDF_Manage.PrintSetup.CurrentPrintSetting;
PrintParameters PDF_Params = PDF_Sets.PrintParameters;
PDF_Params.PaperSize.Equals(Use_Size);
PDF_Params.PageOrientation = PageOrientationType.Landscape;
PDF_Params.ZoomType = ZoomType.Zoom;
PDF_Params.Zoom = 100;
PDF_Params.PaperPlacement = PaperPlacementType.Center;
PDF_Params.HideReforWorkPlanes = true;
PDF_Params.HideUnreferencedViewTags = true;
PDF_Params.HideCropBoundaries = true;
PDF_Params.HideScopeBoxes = true;
PDF_Params.ColorDepth = ColorDepthType.GrayScale;
PDF_Manage.SubmitPrint(uiDoc.ActiveView)
PDF_Manage.PrintToFileName = "MyFileNameVariable.pdf";
我尝试了“...... PrintParameters”的各种选项,并似乎没有抑制由定义打印机调出的对话框。
哦,并且PDF_Manage.PrintToFileName位于SubmitPrint(uiDoc.ActiveView)。我正在复制另外两行代码,并将它们放在我的问题的错误位置 – KeachyPeenReturns
UPDATE:Bluebeam有一个设置,它的管理员工具可以关闭文件名o的提示ption。但是,不会在PDF_Manage.PrintToFileName位置下指定的位置创建PDF文件。 – KeachyPeenReturns
默认的BlueBeam位置是Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) – KeachyPeenReturns