
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Greetings,
I'm writing an app in VB.NET. In a small part of the code I'm working on, I need to examine each entity in a drawing and determine whether it is a block, and if it is not a block, erase it from the drawing.
Here's a snip from the part of the code in question. I can't find an example of how to determine if an entity is a block or not. Can anyone help me get started filling in the green part below. Thank you for any suggestions.
Erik
Dim myEd As Editor = DocumentManager.MdiActiveDocument.Editor
Dim myPSR As PromptSelectionResult = myEd.SelectAll
If myPSR.Status = PromptStatus.OK Then
Dim mySS As SelectionSet= myPSR.Value
ForEach mySelObj As SelectedObject In mySS
Dim myEnt As Entity = mySelObj.ObjectId.GetObject(OpenMode.ForWrite)
'If my Entity is not a block or nested within a block, erase it...
Next
EndIf
Solved! Go to Solution.