Performing INSERT blockname=path

Performing INSERT blockname=path

alex_b
Advocate Advocate
604 Views
2 Replies
Message 1 of 3

Performing INSERT blockname=path

alex_b
Advocate
Advocate

Hello

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

Thanks

alex

0 Likes
605 Views
2 Replies
Replies (2)
Message 2 of 3

Alexander.Rivilis
Mentor
Mentor

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. Smiley Happy

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 3 of 3

alex_b
Advocate
Advocate

Thank you, Alexander

alex

0 Likes