.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error adding blocks to drawing

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
160 Views, 0 Replies

Error adding blocks to drawing

Hello!

I'm trying to add a block to a drawing with C#, but it crashes at the following lines:

if (bt.Has("Sensing Unit"))
{
idBTR = bt["Sensing Unit"];
}
else
{
idBTR = doc.Database.Insert("Sensing Unit",db,false);
}

The fatal error says "eWrongDatabase." Is there any reason why this line would cause that error? How can I check if I have the "right" database before running the check?

Thanks so much for any help!

-Carlos
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost