INTERNAL ERROR!dbinsert.cpp@1309eLockViolation

INTERNAL ERROR!dbinsert.cpp@1309eLockViolation

a.a.w.degraaf
Participant Participant
1,542 Views
12 Replies
Message 1 of 13

INTERNAL ERROR!dbinsert.cpp@1309eLockViolation

a.a.w.degraaf
Participant
Participant

 

This error occurs
INTERNAL ERROR!dbinsert.cpp@1309eLockViolation

 

When this VB routine runs for de second time.

The first time it runs ok.

 

punt1 = ThisDrawing.Utility.GetPoint(, vbCr & "Geef het hart van de deuvel aan: ")
Hoek1 = ThisDrawing.Utility.GetAngle(punt1, vbCr & "Geef de richting van de Lijmnaad aan: ")
Set Deuvel_VBAZ = ThisDrawing.ModelSpace.InsertBlock(punt1, Deuvel_VBAZ_block, HschermD, HschermL, 1, Hoek1)

 

error report CER_113223800

 

how do i solf this problem

0 Likes
Accepted solutions (4)
1,543 Views
12 Replies
Replies (12)
Message 2 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

are you running VB.NET or VBA?

From what source do you call that insert-module?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 3 of 13

a.a.w.degraaf
Participant
Participant

 

Thank you for the replay,

 

The routine runs by Microsoft VBA

0 Likes
Message 4 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

well, then you should not need to lock anything (that is only necessary when you would work with managed/dotNET and not based on COM).

In that case I would first look about other applications/plugins that run on top of your AutoCAD and to make sure you have the newest service pack for your AutoCAD installed.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 5 of 13

a.a.w.degraaf
Participant
Participant

Thank you for jour suggetions.

 

The sp2 is all ready installed.

I will examen the applications/plugins.

 

-Bert

0 Likes
Message 6 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> I will examen the applications/plugins.

Parallel to that you can try to make one small sample VBA, that just does the insertion ... in another module than your app, just to see if you have a generall error while inserting by VBA or if it's depending on the file you try to insert (try another drawing) just to make some steps to isolate the issue.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 7 of 13

a.a.w.degraaf
Participant
Participant

Yes, thank you.

 

I have several of these routines and the the effect is the same.

The first time it runs perfect. The second time , the sam routine with that or any other block to insert, it crashes.

That makes me desperate.

 

By the way, i'm from Holland, excuses for the terrible english.

 

 

0 Likes
Message 8 of 13

Alfred.NESWADBA
Consultant
Consultant
Accepted solution

Hi,

 

>> The first time it runs perfect. The second time , the sam routine with that or any other block to insert, it crashes.

Can you reproduce that in a separate DVB project?

If yes, then upload this project plus the drawings/blocks you are using.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 9 of 13

Anonymous
Not applicable
Accepted solution

Bonjour,

For me, the same error, some time the macro "inserer_bloc_accessoire1" works, some time i have an error.

So i work with "inserer_bloc_accessoire2 and no error.

My dvb and the 2 dwg are attached

Bernard

France

 

Message 10 of 13

FRFR1426
Collaborator
Collaborator
Accepted solution

It looks like that this error happens when you call the InsertBlock method several times with the same file name. If you use the path only for the first time, then only the block name, it works as expected:

 

Dim blockFullPath as String
blockFullPath = "C:\Temp\MyBlock.dwg"
Dim blockName as String blockName = "MyBlock"

' Check if the block exists Dim exist as Boolean exist = False For i = 0 To ThisDrawing.Blocks.Count - 1 If ThisDrawing.Blocks.Item(i).Name = BlockName Then exist = True Exit For End If Next i

' Use the full path if block not exists or the block name if it exists
ThisDrawing.ModelSpace.InsertBlock(point, IIf(exist, blockName, blockFullPath), 1, 1, 1, 0)
Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
Message 11 of 13

a.a.w.degraaf
Participant
Participant

Dear sir,

 

It is a long time ago that i reply, thats becaurse i thouth tha an previously message you had achieved.

But the solution was "ThisDrawing.ActiveSpace = acModelSpace"

I fond it on internet an happily works.

 

Thanks for the support.

 

0 Likes
Message 12 of 13

a.a.w.degraaf
Participant
Participant
Accepted solution

I fond the sollution here

 

Before the block is inserted place these syntax: ThisDrawing.ActiveSpace = acModelSpace

 

Place_drawing:
    ThisDrawing.ActiveSpace = acModelSpace
    Set Place_Block = ThisDrawing.ModelSpace.InsertBlock(Inv_Point, An_Block, 1, 1, 1, (angle1 - 1.5708))


    
Unload HoofdScherm
Exit Sub

0 Likes
Message 13 of 13

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

thank you for your feedback (for future readers) 😉

 

May I assume that within your code after the first look (when your code worked) and before the second look (when your code came up with the crash) you have changed the .ActiveSpace property? Otherwise I would not really understand the need for it.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes