AutoCAD 2018 - INTERNAL ERROR: !dbinsert.cpp@855: eNoDatabase

AutoCAD 2018 - INTERNAL ERROR: !dbinsert.cpp@855: eNoDatabase

Anonymous
Not applicable
1,681 Views
2 Replies
Message 1 of 3

AutoCAD 2018 - INTERNAL ERROR: !dbinsert.cpp@855: eNoDatabase

Anonymous
Not applicable

Hi All, 

I've been struggling this week with this issue:

ERROR.png

This happens when running some old VBA application. 

 

The app consists of creating custom Dynamic Blocks taking a bunch of blocks and putting them together according to users dynamic input parameters.

 

The first time that I run the app, it works perfect, but the second time it crashes. My guess is that some object is not cleared or the memory is not flushed somehow. I used this app in AutoCAD 2012 with no problem.

 

Any tip of advice will be well received!

 

Thanks in advance-

0 Likes
1,682 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Hi All, 

 

Digging into the problem, I think I have a good guess where it crashes. In my code, when I call the block for the first time (another .dwg file... "extBlock.dwg"),  there is no problem an the block is added to my "ThisDrawing.blocks". So the second time that I want to add it, "extBlock.dwg" already exists and when I want to use it with the new parameters it crashes. 

This made me think that the "stored" version of the root block is held in a "read-only" status, so I can`t access and use it for the first time.

 

Q1: Is this making any sense to you?

Q2: How do I release this block (already in "ThisDrawing.blocks") to use it in the future?

 

Thanks in advance!

 

PS: I'm using VBA in AutoCAD 2018.1.2

0 Likes
Message 3 of 3

norman.yuan
Mentor
Mentor

Q1: Is this making any sense to you?

Q2: How do I release this block (already in "ThisDrawing.blocks") to use it in the future?

 


I do not think it makes sense. 

When a block is inserted with ModelSpace[PaperSpace].InsertBlock() with file path/name passed in, method, the block definition will be created with the drawing file name (without ".DWG extension), should the block definition does not exists. If the drawing has a block definition with the same name (same as the file name without *.dwg extension), the existing block definition will be updated to the newly inserted block dwg file. and all previous block references to that block definition would be updated to be the references of newly updated block definition. 

 

There should not be problem that you always insert block with a dwg file name instead of only block name, as long as you do not mind the block file may be different from the existing block definition.

 

So, comes to your issue,  have you tried with different blocks (in case something wrong with the block file you are using), that is, this this issue reproduceable to other simple block files (not a dynamic block) and then a different dynamic block. You may also want to post your relevant code and the block file that causes this issue.

Norman Yuan

Drive CAD With Code

EESignature

0 Likes