Hi @brianM328K. Not really. It is a relatively new area for us to explore by code, as you can see from my response in Message 3 above. I have not done an extensive search on the topic yet within this forum, but I do not recall that much activity in that area yet. I do not really have that much work related interest in that area yet either. I did create an iLogic rule once, just for research purposes into those areas. I will post that code below, just so you can continue on from there, but it does not attempt to change anything, or access any specific settings, such as angle, just collections and objects, down through the several possible levels.
Dim oDDoc As DrawingDocument = ThisDoc.Document
Dim oSheet As Inventor.Sheet = oDDoc.ActiveSheet
Dim oView As DrawingView = oSheet.DrawingViews.Item(1)
Dim oHRs As DrawingViewHatchRegions = oView.HatchRegions
Logger.Info("About to check oHRs IsNothing & oHRs.Count")
If oHRs Is Nothing OrElse oHRs.Count = 0 Then Exit Sub
Logger.Info("oHRs.Count = " & oHRs.Count)
For Each oHR As DrawingViewHatchRegion In oHRs
Logger.Info("About to get region boundary geometries to a variable.")
Dim oHRBGs As ObjectCollection = oHR.BoundaryGeometries
Logger.Info("About to check if region boundary geometries Is Nothing or Count = 0.")
If oHRBGs Is Nothing OrElse oHRBGs.Count = 0 Then
Logger.Info("Region boundary geometries Is Nothing or count = 0")
Else
Logger.Info("Region boundary geometries count = " & oHRBGs.Count)
End If
Logger.Info("About to get region hatch areas to a variable.")
Dim oHAs As DrawingViewHatchAreas = oHR.HatchAreas
Logger.Info("Got region hatch areas to a variable. Now about to check Is Nothing & Count")
If oHAs Is Nothing OrElse oHAs.Count = 0 Then
Logger.Info("Region Hatch Areas Is Nothing or count = 0")
Continue For
Else
Logger.Info("Region Hatch Areas Count = " & oHAs.Count)
For Each oHA As DrawingViewHatchArea In oHAs
Logger.Info("About to get hatch area boundary geometries to a variable.")
Dim oHABGs As ObjectCollection = oHA.BoundaryGeometries
Logger.Info("Got hatch area boundary geometries to a variable.")
If oHABGs Is Nothing OrElse oHABGs.Count = 0 Then
Logger.Info("Hatch area boundary geometries IsNothing Or Count = 0")
Else
Logger.Info("Hatch area boundary geometries Count = " & oHABGs.Count)
End If
Next
End If
Next
If this solved your problem, or answered your question, please click ACCEPT SOLUTION .
Or, if this helped you, please click (LIKE or KUDOS) 👍.
Edit: Here are a few more related forum links, but maybe not what you were looking for yet:
https://forums.autodesk.com/t5/inventor-programming-ilogic/accessing-quot-edit-hatch-pattern-quot-in...
https://forums.autodesk.com/t5/inventor-programming-ilogic/drawing-view-hatch-hided-and-edited/m-p/1...
https://forums.autodesk.com/t5/inventor-programming-ilogic/hatch-scale/m-p/9797912
https://forums.autodesk.com/t5/inventor-programming-ilogic/hatch-regions/m-p/11964839
Wesley Crihfield

(Not an Autodesk Employee)