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

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

1 REPLY 1
Reply
Message 1 of 2
waterharbin
559 Views, 1 Reply

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

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.

1 REPLY 1
Message 2 of 2
Balaji_Ram
in reply to: waterharbin

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.



Balaji
Developer Technical Services
Autodesk Developer Network

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