Hi @ngnam1988. There is no SelectionFilterEnum variation that will allow you to select the individual hatch regions within a drawing view. There does however seem to be a manual filter for them, which is curious. There have been a few forum topics in the past year or two about this. Below are two related links, but there are more out there.
https://forums.autodesk.com/t5/inventor-programming-ilogic/change-hatch-by-pick/m-p/12394233
Most postings I saw have the user picking he view itself, then iterating through the hatch stuff within that view by code, one way or another. But I believe I saw at least one forum topic in which a user developed a custom workaround way to allow a user to select one, without using that Pick function. It was fairly advanced code that included using custom event handers. Seems to me like @Michael.Navara was involved with that post, but I do not recall where that link was.
Wesley Crihfield
(Not an Autodesk Employee)
@ngnam1988 Yes, to a certain degree. But those other settings, like what you are showing in your image above, and what I am showing information for below, will not stay in effect when using either the pre-select method, or when using the Pick function when using an iLogic rule.
Following are two direct properties of the DrawingDocument object, which allow similar settings to what you commonly see in the quick access bar of a drawing.
DrawingDocument.SelectionPreferences
DrawingDocument.SelectionPriority
The SelectionPriority is fairly basic, using a variation of the SelectionPriorityEnum as its value.
The SelectionPreferences is more in depth, allowing specific ObjectTypeEnum variation inputs. But as I mentioned, those settings may effect manual user interactions within the visible user interface, but do not seem to carry over into what we do by code within iLogic rules.
Wesley Crihfield
(Not an Autodesk Employee)
In my opinion there is no way, how to select hatches and do something useful with them. Because some API functionality is missing.
If you try to select hatches and look in to the selectSet, you can see there is selected items count = 1, but Item1 is Nothing. If you select something useful (drawing curve for example) you can obtain them from Item1.
EDIT
As @WCrihfield mentions above, similar issue is with WeldSymbols. WeldSymols doesn't have according SelectionFilterEnum value, but can be obtained from selectSet.
Hatches can be obtained only from DrawingView.HatchRegions Property
Can't find what you're looking for? Ask the community or share your knowledge.