C#CAD环境下DWG转PDF使⽤命令CAD环境下DWG转PDF
Private Sub Button2_Click(nder As Object, e As EventArgs) Handles Button2.Clickaround怎么读
Dim f As FileInfo = New FileInfo("E:\j9-FwfeplGMIpixSqiD9d.dxf")
Dim f1 As FileInfo = New FileInfo("E:\[3500×0×2][数量10](1).dxf")
'Dim f2 As FileInfo = New FileInfo("E:\j9-FwfeplGMIpixSqiD9d.dxf")
hero英文歌词'Dim f3 As FileInfo = New FileInfo("E:\j9-FwfeplGMIpixSqiD9d.dxf")adequate是什么意思
Dim list = New List(Of FileInfo)()
list.Add(f)
list.Add(f1)
Dwg2Pdf(list)
End Sub
gmat黄历Public Shared Sub Dwg2Pdf(ByVal files As List(Of FileInfo))
Dim doc As AcadDocument = Nothing
Dim destPath As String = String.Empty
先生英语怎么说'InitializationApp()
Dim activeDoc As Document = Application.DocumentManager.MdiActiveDocument
everything is nothing'Dim ThisDrawing As AcadDocument = CType(activeDoc.AcadDocument, AcadDocument)
Try
For Each f In files
'doc = _app.Documents.Open(f.FullName, True)
doc = Application.DocumentManager.Open(f.FullName, True).AcadDocument
'doc = ThisDrawing.Open(f.FullName, True)
'ThisDrawing.LoadShapeFile(f.FullName)
'doc = ThisDrawing
doc.SetVariable("sdi", 0)
doc.SetVariable("Filedia", 0)
doc.SetVariable("RASTERPREVIEW", 1)
doc.SetVariable("BACKGROUNDPLOT", 0)
doc.ActiveLayout.ConfigName = "DWG To PDF.pc3"
personal information
doc.ActiveLayout.UStandardScale = True
doc.ActiveLayout.StandardScale = AcPlotScale.acScaleToFit
doc.ActiveLayout.PlotType = AcPlotType.acExtents
doc.ActiveLayout.CenterPlot = True
doc.ActiveLayout.PlotRotation = AcPlotRotation.ac0degrees
doc.ActiveLayout.PlotType = Autodesk.AutoCAD.Interop.Common.AcPlotType.acExtents
词组翻译doc.Plot.QuietErrorMode = True
destPath = Path.Combine(f.Directory.FullName, Path.GetFileNameWithoutExtension(f.Name) & ".pdf")
doc.Plot.PlotToFile(destPath)
black and whiteIf doc IsNot Nothing Then doc.Clo(Fal)
Nextchang e
Catch e As System.Exception
Throw e
Finally
Try
doc.Clo(Fal)
_app.Quit()
Catch
End Try
End Try
End Sub