Hello there!
I need to make a small sub which aims putting all modelspace hatch objects to bottom in draw order. I've debugged the code below, but the line in red never works. Now I'm trapped in here. Please someone help me out? Thanks a million.
Sub hatch_to_back()
Dim eDictionary As ObjectDim sentityObj As Object
Dim A1_STB(0) As Object
For Each b In ThisDrawing.ModelSpace
If TypeName(b) = "IAcadHatch" Then
Set eDictionary = ThisDrawing.ModelSpace.GetExtensionDictionary*
On Error Resume Next*
Set sentityObj = eDictionary.GetObject("ACAD_SORTENTS")
If sentityObj Is Nothing Then*
Set sentityObj = eDictionary.AddObject("ACAD_SORTENTS", "AcDbSortentsTable")
End If
Set A1_STB(0) = b
sentityObj.MoveToBottom A1_STB
AcadApplication.Update
End If
Next
End Sub