INTERNAL ERROR: !dbinsert.cpp@1351: eLockViolation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Have not programmed in VBA environment for probably over ten years and last version had VBA built into AutoCAD. Need to update an existing system to run on new Windows 10 64 bit systems running AutoCAD 2018 64 bit. This issue has me stumped. Following is code that can be used to duplicate the issue. Notice that both sub routines are identical. Once the dvb is loaded, you are able to keep running one of the subs over and over again. But as soon as I go and hit the other sub it crashes. Image of error below. This error occurs on all three of my AutoCAD installs 2017, 2018, 2019 and all are 64 bit running on Windows 10 x64. Any thoughts? Thank you!
Sub a_001()
Dim pnt As Variant
pnt = ThisDrawing.Utility.GetPoint(, "Select: ")
Dim x As AcadBlockReference
Set x = ThisDrawing.ModelSpace.InsertBlock(pnt, "C:\???.dwg", 1#, 1#, 1#, 0#)
End Sub
Sub a_002()
Dim pnt As Variant
pnt = ThisDrawing.Utility.GetPoint(, "Select: ")
Dim x As AcadBlockReference
Set x = ThisDrawing.ModelSpace.InsertBlock(pnt, "C:\???.dwg", 1#, 1#, 1#, 0#)
End Sub