ObjectARX

Reply
Distinguished Contributor
alex_b
Posts: 399
Registered: ‎08-15-2003
Message 1 of 3 (111 Views)

Performing INSERT blockname=path

111 Views, 2 Replies
09-25-2012 06:07 AM

Hello

How can I do this programatically w/o using Command...?

Thanks

alex

Moderator
Alexander.Rivilis
Posts: 1,431
Registered: ‎04-09-2008
Message 2 of 3 (106 Views)

Re: Performing INSERT blockname=path

09-25-2012 06:49 AM in reply to: alex_b

I understand you're going to replace one existing block other block of the file. Then you can:

1) Create AcDbDatabase;

2) Read into this AcDbDatabase from dwg-file (using AcDbDatabase::readDwgFile() method);
3) Use the method AcDbDatabase::insert() to insert the block;
4) AcDbObjectId::swapIdWith () to switch between the new and the old block
5) Old block can be removed.
Something like that. :smileyhappy:


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Distinguished Contributor
alex_b
Posts: 399
Registered: ‎08-15-2003
Message 3 of 3 (93 Views)

Re: Performing INSERT blockname=path

09-26-2012 08:15 AM in reply to: Alexander.Rivilis

Thank you, Alexander

alex

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.