New to the forum and new to .NET. Done a little VBA, a little LISP, a little asp.net. So not so much a stranger to programing. However .NET is a whole new can of woopin-my-a$$. :ugly:
This is for ACA 2010 using VS Express 2010. I'm accessing the Autodesk version 18 assemblies and .net 3.5 or 2.0 where applicable.
So here's the dilemma. I'm porting over a VBA project the "Hard way". Meaning I'm writing it from scratch. Essentially it's a batch processing dialog that does a number of things. The problem however is in iterating through my files. I keep getting an outofmemoryexception on this line:
Dim acadDoc As New Autodesk.AutoCAD.Interop.AcadDocument ...modified for clarity.
with in the context of:
Imports Autodesk.AutoCAD.Runtime
Imports Autodesk.AutoCAD.DatabaseServices
Imports Autodesk.AutoCAD.Interop
Imports acadDocIM = Autodesk.AutoCAD.Interop.AcadDocument
...code list of file names and process procedure
Public Sub ProcessDwg(ByVal ThisDwg As String, ByVal processedFile As String, ByVal processSelection As Integer)
BatcherMainDialog.ActiveForm.Hide()
Dim acadDoc As New acadDocIM
acadDoc.Application.Documents.Open(ThisDwg)
acadDoc = AcadApp.ActiveDocument
Select Case processSelection
Case 0
PurgeBlockMethod("border") ...do something
End Select
acadDoc.SaveAs(processedFile, False, False)
acadDoc.Close(False, processedFile)
End Sub
Anyway I know it's something really simple, it's just beyond me at the moment.
Thanks
Slap