.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Selection Set from model space BTR

2 REPLIES 2
Reply
Message 1 of 3
RobJG
401 Views, 2 Replies

Selection Set from model space BTR

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.

 

2 REPLIES 2
Message 2 of 3
Alexander.Rivilis
in reply to: RobJG

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
Expert Elite Member

Message 3 of 3
RobJG
in reply to: Alexander.Rivilis

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.

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost