Hi.
I write a programe, this programe needs to insert some standard illustrations. I made these standard illustrations into different blocks. And I store these blocks in a dwg file. Everytime I need to insert some illustrations, I just click the mouse on the current drawing, I want the illustration inserted. These means the following points:
(1) Import the blocks to the current drawing, if the blocks have already been imported, then do nothing.
(2) Specify the insert point by clicking the mouse, and I want the block's insert point to coincide with the mouse clicking point.
I have searched this forum and other forums too, I found some codes snippets. I found I am in very bad luck, these snippets are neither incomplete nor just don't work at all. I have spent a few days on this, and still don't have a solution. Someone here help me.
Sorry for the delay.
If you havent found it already, here are some blog posts that can help :
http://through-the-interface.typepad.com/through_the_interface/2006/08/import_blocks_f.html
After the blocks have been imported, create blockreference for any of those blocks. This blog post can help although it also includes attributes which may not be part of all of your block definitions :
http://adndevblog.typepad.com/autocad/2012/06/inserting-a-block-with-attributes-to-modelspace.html
If you continue to have an issue with this topic, please let me know.
I will create a sample project and share it with you.