I am using RealDWG.
Based on Autodesk documents, each DWG file will contain a Model_Space block and a Paper_Space block. Then, how to get it via RealDWG?
Thanks
Same as you would for any BlockTableRecord - open the BlockTable and access the BlockTableRecord from there. The ObjectARX Training labs posted to www.autodesk.com/developautocad and the ObjectARX sampels have code demonstrating this.
You can use macro ACDB_MODEL_SPACE defined in acdb.h
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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
It's easier to just use the SymbolUtilityServices class, which has a method that returns the ObjectId of the model space BlockTableRecord.
For a specific PaperSpace layout block, it can depend on whether you want the block for a specific layout given its name, as the block names for paper space layout blocks aren't really useful for much.
Hi,
You should use this:
Acad::ErrorStatus es;
AcDbDatabase * pDatabase = acdbHostApplicationServices()->workingDatabase();
AcDbBlockTableRecordPointer pBlockTableRecord(ACDB_MODEL_SPACE, pDatabase, AcDb::kForRead); if((es = pBlockTableRecord.openStatus()) != Acad::eOk) return;
...
Regards,
Jonathan