Yes you can. But you can only set this option when the material is defined in the Standard Style. When you change the material of a component to a material that is not listed, then automaticly this value is set to false and is't not available for selection.

here is a small sample:
Dim oDoc As DrawingDocument
oDoc = ThisDoc.Document
Dim oSheet As Sheet
Dim oView As DrawingView
Dim oHatchRegion As DrawingViewHatchRegion
For Each Sheet In oDoc.Sheets
For Each oView In oDoc.ActiveSheet.DrawingViews
If Not oView.HatchRegions Is Nothing Then
For Each oHatchRegion In oView.HatchRegions
'Set ByMaterial
Try
oHatchRegion.ByMaterial = True
Logger.Info(oView.Name & ": HatechRegion.ByMaterial = " & oHatchRegion.ByMaterial)
Catch
MessageBox.Show("The Material of the sectioned component is not in Style definition, please add the material before ByMaterial can turned on", "Set By material")
End Try
Next
End If
Next
Next