Advertisement
Advertisement
| 02.15.2008 at 02:05PM PST, ID: 23167461 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: |
Private Sub cmdFixWipeoutBlock_Click()
Dim blockObj As AcadBlock
Dim eDictionary As AcadDictionary
Dim sentityObj As Object
Dim ents As AcadEntity
Dim arr(0) As AcadObject
For Each blockObj In ThisDrawing.Blocks
'Set blockObj = ThisDrawing.Blocks(bname)
'Gxet an extension dictionary and, if necessary, add a SortentsTable object**this is done "inside" the block.
Set eDictionary = blockObj.GetExtensionDictionary '***this was the key
' Prevent failed GetObject calls from throwing an exception
On Error Resume Next
Set sentityObj = eDictionary.GetObject("ACAD_SORTENTS")
If Err.Number <> 0 Then
If sentityObj Is Nothing Then
' No SortentsTable object, so add one
Set sentityObj = eDictionary.AddObject("ACAD_SORTENTS", "AcDbSortentsTable")
End If
Err.Clear ' just a way to get error numbers if/when they occur
End If
On Error GoTo 0
For Each ents In blockObj
If ents.ObjectName = "AcDbWipeout" Then
Set arr(0) = ThisDrawing.ObjectIdToObject(ents.ObjectID)
'Move the wipeout object to the bottom
sentityObj.MoveToBottom arr
'MsgBox ents.ObjectName
End If
Next
Next
ThisDrawing.Regen acActiveViewport
'clean up anything that may be left over
Set sentityObj = Nothing
Set eDictionary = Nothing
Set blockObj = Nothing
Set ents = Nothing
End Sub
|