Posts: 14
Registered: ‎07-17-2011
Message 1 of 2 (272 Views)

Insert block form external dwg file and specify the insert point by click mouse

272 Views, 1 Replies
04-02-2013 05:36 AM


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.

ADN Support Specialist
Posts: 692
Registered: ‎03-21-2011
Message 2 of 2 (208 Views)

Re: Insert block form external dwg file and specify the insert point by click mo

05-02-2013 04:38 AM in reply to: waterharbin

Sorry for the delay.


If you havent found it already, here are some blog posts that can help :




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 :



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.

Developer Technical Services
Autodesk Developer Network

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

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