在 AutoCAD 上将 dwg 转换为 pdf [英] Convert dwg to pdf on AutoCAD

查看:35
本文介绍了在 AutoCAD 上将 dwg 转换为 pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何使用 VBA 将我的 AutoCAD 绘图绘制为 Pdf?我试过了

Hi how can I Plot to Pdf my AutoCAD drawing using VBA? I Tried

Sub PlotToPdf()
ThisDrawing.ActiveLayout.ConfigName = "DWF6 ePlot.pc3"
Dim plotFileName As String
plotFileName = "Z:USERSKweziMPROJECT SMyPlot.pdf"

Dim result As Boolean

result = ThisDrawing.Plot.PlotToFile(plotFileName)
End Sub

但这不起作用.

推荐答案

最后一行应该是子程序调用,而不是函数调用...应该是这样的

That last line should be a subroutine call, not a function call... it should look like this

ThisDrawing.Plot.PlotToFile plotFileName

您不需要 result 变量.

这篇关于在 AutoCAD 上将 dwg 转换为 pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆