Jump to content

Recommended Posts

Posted

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

Posted

Still haven't got an answer, so sad, seems nobody cares...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...