一、直接导出图纸方法:
commandData.Application.ActiveUIDocument.Document.ExportImage(new ImageExportOptions()
{FilePath= Environment.GetFolderPath(Environment.SpecialFolder.Desktop)+"\\图纸.png", PixelSize = 5000, ShadowViewsFileType = ImageFileType.PNG, HLRandWFViewsFileType = ImageFileType.PNG });
二、调用revit自身的导出图片图纸界面:
using (Transaction trans = new Transaction(commandData.Application.ActiveUIDocument.Document, "导出图纸"))
{
trans.Start();
RevitCommandId cmdid = RevitCommandId.LookupPostableCommandId(PostableCommand.ExportImagesandAnimationsImage);
commandData.Application.PostCommand(cmdid);
trans.Commit();
}
博客介绍了Revit导出图纸的两种方法,一是直接导出图纸,二是调用Revit自身的导出图片图纸界面。
2723

被折叠的 条评论
为什么被折叠?



