ObjectARX

ObjectARX

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

Performing INSERT blockname=path

115 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,451
Registered: ‎04-09-2008
Message 2 of 3 (110 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: 405
Registered: ‎08-15-2003
Message 3 of 3 (97 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
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.