Im trying to get a selection of certain objects from the modelspace btr of a dwg im opening in code (not in the active autocad window) but failing horribly.
Can anyone point me in the right direction?
Heres a cut down version of code showing where im at until I get to the selection part.
Dim objDB As New Database(False, True) objDB.ReadDwgFile(filePath, FileShare.Read, False, "") Using trans As Transaction = objDB.TransactionManager.StartTransaction Dim bt As BlockTable = trans.GetObject(objDB.BlockTableId, OpenMode.ForRead, False) Dim btr As BlockTableRecord = trans.GetObject(bt(BlockTableRecord.ModelSpace), OpenMode.ForRead)
End Using
I've tried a few different things past this point but nothing seems to work. Any advise/code snippets would be appreciated.
Selection Set makes sense only with dwg-file opened in AutoCAD editor.
Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | 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
Yeah, this has just occured to me too.
Currently working with the objectIDs in the btr now to see if I can do what I want.