Message 1 of 3
Plotting in VB.NET

Not applicable
03-25-2004
06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have this code
which worked in VB6
It opens the drawing OK but get and error which is not in the code and wants to see the disassembly.
------------------
Dim A2K As AutoCAD.AcadApplication
Try
A2K = GetObject(, "AutoCAD.Application")
Catch
A2K = CreateObject("AutoCAD.Application")
End Try
Dim A2Kdwg As AutoCAD.AcadDocument = A2K.ActiveDocument
A2K.Visible = True
A2Kdwg.Application.Documents.Open(DWGName1)
A2Kdwg.ActiveDocument.plot.PlotToDevice("HP LaserJet 4050 Series PCL6")
----------------------------------
which worked in VB6
It opens the drawing OK but get and error which is not in the code and wants to see the disassembly.
------------------
Dim A2K As AutoCAD.AcadApplication
Try
A2K = GetObject(, "AutoCAD.Application")
Catch
A2K = CreateObject("AutoCAD.Application")
End Try
Dim A2Kdwg As AutoCAD.AcadDocument = A2K.ActiveDocument
A2K.Visible = True
A2Kdwg.Application.Documents.Open(DWGName1)
A2Kdwg.ActiveDocument.plot.PlotToDevice("HP LaserJet 4050 Series PCL6")
----------------------------------