ObjectARX

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

Performing INSERT blockname=path

105 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,398
Registered: ‎04-09-2008
Message 2 of 3 (100 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: 393
Registered: ‎08-15-2003
Message 3 of 3 (87 Views)

Re: Performing INSERT blockname=path

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

Thank you, Alexander

alex

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
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 to get help installing your software.

Ask the Community