I was executing a macro and it endend with an access violation :
Sub insert_block()
Dim insertionPnt(0 To 2) As Double
Dim blockRefObj As AcadBlockReference
insertionPnt(0) = 0#: insertionPnt(1) = 0#: insertionPnt(2) = 0#
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "c:\Cart_Sup.dwg", 1#, 1#, 1#, 0)
End Sub
It seems to crash when it runs the line : Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(insertionPnt, "c:\Cart_Sup.dwg", 1#, 1#, 1#, 0)
We can open the DWG file or insert it manually in autocad.
The macro runs perfectly in earlier version (ie Autocad 2004 or 2005)
Do you have an idea of the problem?
Thank you