I have several hatch objects in a modelspace.
I want to edit those hatches by vba. I prefer without selection by the user.
(All hatches must be separated I learned this must be done with sendcommand see my other topic).
I searched the helpfile and found acadselectionset. I don't know this is the right way and how I use this with the sendcommand method. Important I want vba to select the hatch.
I hope you understand what I mean
please you can help me?
gr. Laszlo
There is no need to use sendcommand here is the code you needed.
Public Sub hatch_sel() Dim oHatch As AcadHatch Dim FilterType(0) As Integer Dim FilterData(0) As Variant On Error Resume Next ThisDrawing.SelectionSets.Item("SS1").Delete Dim ssetObj As AcadSelectionSet Set ssetObj = ThisDrawing.SelectionSets.Add("SS1") FilterType(0) = 0 FilterData(0) = "HATCH" ssetObj.Select acSelectionSetAll, , , FilterType, FilterData n = 0 For Each Item In ssetObj Set oHatch = ssetObj.Item(n) 'do what you want to do n = n + 1 Next Item ThisDrawing.SelectionSets.Item("SS1").Delete End Sub
Thank you!
Now I understand filter in selectionset.
The sendcommand method I need to seperate already drawed hatches in the drawing.
gr. Laszlo