小弟有疑问啊:。net里调用,作图之后,想打印为DWF格式,可是在使用plot对象的plottofile语句后,返回TRUE,语句执行成功,可是找不到打印出来的文件。 Dim app As New AcadApplication ' 定义Application对象 Dim adobj As New AcadDocument ' 定义Document对象 adobj = app.ActiveDocument ' 定义Document对象 Dim plineObj As AcadLine ' 定义Line对象 Dim pointa(0 To 2) As Double ' 定义两个一维数组存储点 Dim pointb(0 To 2) As Double Dim ss As Boolean ' 给两个三维点赋值 pointa(0) = 2 : pointa(1) = 4 : pointa(2) = 4 pointb(0) = 2 : pointb(1) = 6 : pointb(2) = 4 ' 在模型空间中创建以pointa,pointb为端点的直线对象 plineObj = adobj.ModelSpace.AddLine(pointa, pointb)
Dim layoutliscon As Object Dim ad As String layoutliscon = "f:\pubtoweb.pc3" ad = "f:\MyPlot.dwf" ss = adobj.Plot.PlotToFile(ad, layoutliscon) '以DXF格式存储文件“BDK40” adobj.SaveAs("f:\ BDK40", AcSaveAsType.ac2004_dxf) adobj.Close()
app.Quit() '释放Application对象 |