here's a quick untested idea
emphasis on untested, but may give you the general
idea
Sub SelectLayerObjs(ByVal sLayName As
String)
Dim LaySelSet As
AcadSelectionSet
On Error Resume
Next
Set LaySelSet =
ThisDrawing.SelectionSets.Item(sLayName)
If
Err Then
Err.Clear
Set LaySelSet =
ThisDrawing.SelectionSets.Add(sLayName)
Else
LaySelSet.Clear
LaySelSet.Delete
End If
'define type of
selection set (crossing, window, etc, in this case, all)
Dim mode As Integer
mode = acSelectionSetAll
'this is a
selection set filter
Dim gpCode(0) As
Integer
Dim dataValue(0) As Variant
gpCode(0) = 8
dataValue(0) =
sLayName
Dim groupCode As Variant,
dataCode As Variant
groupCode =
gpCode
dataCode = dataValue
'this
collects all objects on 'sLayName' layer into the seletion
set
LaySelSet.Select mode, , , groupCode,
dataCode
Dim NumOfLay As Integer
NumOfLay = LaySelSet.Count
If NumOfLay = 1
Then
MsgBox "There is only one lonely little
object on " & sLayName & " layer."
Else
MsgBox "There are " & NumOfLay &
" objects on " & sLayName & " layer."
End
If
'clean up
LaySelSet.Clear
LaySelSet.Delete
End
Sub
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
Hi,
i am stuck with this point.
Kindly guide,
Thanks
Mniaz