below is some code that selects objects that are on a specific layer. What code do I need to add for selecting only model space objects? I tried to use a set command to reference model space but this did not work. Any help is appreciated. I also want to take the model space selection set and create a block from the objects. Would i need to check the block table for the block if it exists in the drawing?
Code:
Sub scalebar()
Dim sstext As AcadSelectionSet
Dim entObj As AcadEntity
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Dim mode As Integer
mode = acSelectionSetAll
Set sstext = ThisDrawing.SelectionSets.Add("SS2")
FilterType(0) = 8
FilterData(0) = "G-TTLB-PLBK"
sstext.Select mode, , , FilterType, FilterData
sstext.Delete
End Sub