.NET

Reply
Member
ccabrera
Posts: 3
Registered: ‎07-18-2005
Message 1 of 1 (56 Views)

Error adding blocks to drawing

56 Views, 0 Replies
11-03-2005 05:37 PM
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
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.