.NET

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

Error adding blocks to drawing

61 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
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.