Greetings,
I need help figuring out a fatal error. Thank you for any helpful direction you can provide.
I have a vb.net app which publishes a multi-sheet dwf. The paths are hard-coded into the application.
The application runs perfectly on my desktop machine, but on my laptop it produces a fatal error:
FATAL ERROR: Unhandled Access Violation Reading 0x.....
The error code after the 0x is different each time and once in a while the error is "Writing" rather than "Reading".
I'll paste the code in below my description.
Where the error occurs:
The app successfully prints each dwf, but at the point where they are to get published together in a multisheet dwf, the error happens.
Laptop and Desktop are each runing Win7, 64-bit, ACAD2015 and running the same dll initiated from the same cuix toolbar. Desktop runs from a network drop, laptop is wireless, however I plugged the laptop into the network drop and got the same result. All folders and files are accessible (not Read-Only). Desktop has 12 GB RAM, laptop has 8 GB RAM.
Here's the code. I've also pasted it into a Word doc (attached) which is easier to read with the visual studio colors and formatting.
Public Sub RFS2DWF()
Try
Dim collection As New DsdEntryCollection()
Dim entry As DsdEntry
entry = New DsdEntry()
entry.Layout = "RFS21-DWF"
entry.DwgName = "I:\CAD\RFS2\RFS2-DWF\RFS21-POR.dwg"
entry.Nps = "Setup1"
entry.Title = "RFS2 Labs Level 1"
collection.Add(entry)
entry = New DsdEntry()
entry.Layout = "RFS22-DWF"
entry.DwgName = "I:\CAD\RFS2\RFS2-DWF\RFS22-POR.dwg"
entry.Nps = "Setup1"
entry.Title = "RFS2 Labs Level 2"
collection.Add(entry)
Dim dsd As New DsdData()
dsd.SetDsdEntryCollection(collection)
dsd.ProjectPath = "I:\CAD\RFS2\RFS2-DWF\"
dsd.LogFilePath = "I:\CAD\RFS2\RFS2-DWF\logdwf.log"
dsd.SheetType = SheetType.MultiDwf
dsd.NoOfCopies = 1
dsd.DestinationName = "I:\CAD\RFS2\RFS2-DWF\RFS2-POR-DWF\RFS2-POR.dwf"
dsd.SheetSetName = "PublisherSet"
dsd.WriteDsd("I:\CAD\RFS2\RFS2-DWF\publisher.dsd")
Dim nbSheets As Integer = collection.Count
Using progressDlg As New PlotProgressDialog(False, nbSheets, True)
progressDlg.UpperPlotProgressRange = 100
progressDlg.LowerPlotProgressRange = 0
progressDlg.UpperSheetProgressRange = 100
progressDlg.LowerSheetProgressRange = 0
progressDlg.IsVisible = True
Dim publisher As Autodesk.AutoCAD.Publishing.Publisher = Application.Publisher
Autodesk.AutoCAD.PlottingServices.PlotConfigManager.SetCurrentConfig("DWF6 ePlot.pc3")
publisher.PublishDsd("I:\CAD\RFS2\RFS2-DWF\publisher.dsd", progressDlg)
End Using
Catch ex As Autodesk.AutoCAD.Runtime.Exception
End Try
End Sub
Hi,
Try code present in devblog http://adndevblog.typepad.com/autocad/2012/04/publishing-all-layouts-of-the-drawing-file-to-a-dwf-fi... . Though the code is C#, the logic/steps are same for VB.NET