0 Members and 1 Guest are viewing this topic.
Option Explicit'Private Sub AcadDocument_BeginSave(ByVal FileName As String)Sub purge_em()Dim strSubName As StringDim objDictionary As AcadDictionaryDim objFilter As AcadObjectOn Error GoTo Err_CtrlstrSubName = "PurgeFilter.DVB"Set objDictionary = ThisDrawing.Layers.GetExtensionDictionary("ACAD_LAYERFILTERS")For Each objFilter In objDictionary objFilter.DeleteNextIf Left(ThisDrawing.GetVariable("ACADVER"), 2) = "16" Then Set objDictionary = ThisDrawing.Layers.GetExtensionDictionary("ACLYDICTIONARY") For Each objFilter In objDictionary objFilter.Delete Next objFilterEnd IfExit_Here: Exit Sub Err_Ctrl: Select Case Err.Number Case -2145386476 Err.Clear Resume Next Case Else MsgBox "An Error occurred in " & strSubName & "." & vbCr & vbCr _ & "Error number: " & Err.Number & vbCr & Err.Description & vbCr & vbCr _ & "DUM DIGga DUM DIGga DIGga DIGga DUM", vbCritical, _ "Error in " & strSubName GoTo Exit_Here End Select End Sub
Layer property filters: Includes layers that have names or other properties in common. For example, you can define a filter that includes all layers that are red and whose names include the letters mech. Layer group filters: Includes the layers that are put into the filter when you define it, regardless of their names or properties.
& "DUM DIGga DUM DIGga DIGga DIGga DUM"