Layer Filter Delete...case-sensitive??

Layer Filter Delete...case-sensitive??

Anonymous
Not applicable
487 Views
8 Replies
Message 1 of 9

Layer Filter Delete...case-sensitive??

Anonymous
Not applicable
Just an FYI: Using the following code to remove Layer Properties Filters, I've noticed something kinda quirky. On some of my drawings (mainly Land Desktop and Building Systems, both 2005), it didn't work. HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then it works (same thing for the LSP equivalent that R Bell has posted before). I didn't realize it was case sensitive??!? Sub LayerFilterDelete() Dim objDict As AcadDictionary Dim objRec As AcadObject If ThisDrawing.Layers.HasExtensionDictionary Then Set objDict = ThisDrawing.Layers.GetExtensionDictionary For Each objRec In objDict If (objRec.Name = "ACAD_LAYERFILTERS") Or _ (objRec.Name = "AcLyDictionary") Then objDict.Remove objRec.Name Next End If End Sub -- I love deadlines I like the whooshing sound they make as they fly by.
0 Likes
488 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
Okay... now I'm totally confused. I took a look at the Acad Database using DBVIEW and prior to running the layer filter delete program, ACLYDICTIONARY did NOT exist. But if I manually deleted the layer filters, then opened DBVIEW again to take a look, ACLYDICTIONARY shows up. (Maybe it's NOT case-sensitive) So now my question is, what need's to be initiated before the program can be run?? We've found this to be an invaluable tool since we're constantly dealing with drawings from people who, let's face it, don't know how to clean up after themselves. In one drawing alone, I've deleted 13,500 layer filters (that's not a typo). You can just imagine how long it took to display the layer properties manager!! -- I love deadlines I like the whooshing sound they make as they fly by. "Matt W" wrote in message news:4149946f$1_2@newsprd01... | Just an FYI: | | Using the following code to remove Layer Properties Filters, I've noticed | something kinda quirky. | On some of my drawings (mainly Land Desktop and Building Systems, both | 2005), it didn't work. | HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then it | works (same thing for the LSP equivalent that R Bell has posted before). | | I didn't realize it was case sensitive??!? | | Sub LayerFilterDelete() | Dim objDict As AcadDictionary | Dim objRec As AcadObject | If ThisDrawing.Layers.HasExtensionDictionary Then | Set objDict = ThisDrawing.Layers.GetExtensionDictionary | For Each objRec In objDict | If (objRec.Name = "ACAD_LAYERFILTERS") Or _ | (objRec.Name = "AcLyDictionary") Then objDict.Remove | objRec.Name | Next | End If | End Sub | | -- | I love deadlines | I like the whooshing sound they make as they fly by. | | |
0 Likes
Message 3 of 9

Anonymous
Not applicable
I have no idea why it does what it does, as I don't have 2005 to experiment with. However, couldn't you just change the code to this to take care of and case-sensitivity? If (Ucase(objRec.Name) = "ACAD_LAYERFILTERS") Or _ (Ucase(objRec.Name) = "ACLYDICTIONARY") Then objDict.Remove -- Jeff check out www.cadvault.com "Matt W" wrote in message news:4149965e$1_1@newsprd01... > Okay... now I'm totally confused. > I took a look at the Acad Database using DBVIEW and prior to running the > layer filter delete program, ACLYDICTIONARY did NOT exist. But if I > manually deleted the layer filters, then opened DBVIEW again to take a > look, > ACLYDICTIONARY shows up. (Maybe it's NOT case-sensitive) > > So now my question is, what need's to be initiated before the program can > be > run?? We've found this to be an invaluable tool since we're constantly > dealing with drawings from people who, let's face it, don't know how to > clean up after themselves. In one drawing alone, I've deleted 13,500 > layer > filters (that's not a typo). You can just imagine how long it took to > display the layer properties manager!! > > -- > I love deadlines > I like the whooshing sound they make as they fly by. > > "Matt W" wrote in message > news:4149946f$1_2@newsprd01... > | Just an FYI: > | > | Using the following code to remove Layer Properties Filters, I've > noticed > | something kinda quirky. > | On some of my drawings (mainly Land Desktop and Building Systems, both > | 2005), it didn't work. > | HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then > it > | works (same thing for the LSP equivalent that R Bell has posted before). > | > | I didn't realize it was case sensitive??!? > | > | Sub LayerFilterDelete() > | Dim objDict As AcadDictionary > | Dim objRec As AcadObject > | If ThisDrawing.Layers.HasExtensionDictionary Then > | Set objDict = ThisDrawing.Layers.GetExtensionDictionary > | For Each objRec In objDict > | If (objRec.Name = "ACAD_LAYERFILTERS") Or _ > | (objRec.Name = "AcLyDictionary") Then objDict.Remove > | objRec.Name > | Next > | End If > | End Sub > | > | -- > | I love deadlines > | I like the whooshing sound they make as they fly by. > | > | > | > >
0 Likes
Message 4 of 9

Anonymous
Not applicable
Absolutely I could do that, but what baffles me is, why doesn't AcLyDictionary exist when I open a drawing?? I've got a ton of layer filters that need to be deleted, but they won't because that particular dictionary doesn't even exist!! Do I need to create it first to initialize something going on behind the scenes before I can delete it??!? (I think my head's going to explode this morning) -- I love deadlines I like the whooshing sound they make as they fly by. "Jeff Mishler" wrote in message news:41499ee2_2@newsprd01... | I have no idea why it does what it does, as I don't have 2005 to experiment | with. However, couldn't you just change the code to this to take care of and | case-sensitivity? | | If (Ucase(objRec.Name) = "ACAD_LAYERFILTERS") Or _ | (Ucase(objRec.Name) = "ACLYDICTIONARY") Then objDict.Remove | | -- | Jeff | check out www.cadvault.com | "Matt W" wrote in message | news:4149965e$1_1@newsprd01... | > Okay... now I'm totally confused. | > I took a look at the Acad Database using DBVIEW and prior to running the | > layer filter delete program, ACLYDICTIONARY did NOT exist. But if I | > manually deleted the layer filters, then opened DBVIEW again to take a | > look, | > ACLYDICTIONARY shows up. (Maybe it's NOT case-sensitive) | > | > So now my question is, what need's to be initiated before the program can | > be | > run?? We've found this to be an invaluable tool since we're constantly | > dealing with drawings from people who, let's face it, don't know how to | > clean up after themselves. In one drawing alone, I've deleted 13,500 | > layer | > filters (that's not a typo). You can just imagine how long it took to | > display the layer properties manager!! | > | > -- | > I love deadlines | > I like the whooshing sound they make as they fly by. | > | > "Matt W" wrote in message | > news:4149946f$1_2@newsprd01... | > | Just an FYI: | > | | > | Using the following code to remove Layer Properties Filters, I've | > noticed | > | something kinda quirky. | > | On some of my drawings (mainly Land Desktop and Building Systems, both | > | 2005), it didn't work. | > | HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then | > it | > | works (same thing for the LSP equivalent that R Bell has posted before). | > | | > | I didn't realize it was case sensitive??!? | > | | > | Sub LayerFilterDelete() | > | Dim objDict As AcadDictionary | > | Dim objRec As AcadObject | > | If ThisDrawing.Layers.HasExtensionDictionary Then | > | Set objDict = ThisDrawing.Layers.GetExtensionDictionary | > | For Each objRec In objDict | > | If (objRec.Name = "ACAD_LAYERFILTERS") Or _ | > | (objRec.Name = "AcLyDictionary") Then objDict.Remove | > | objRec.Name | > | Next | > | End If | > | End Sub | > | | > | -- | > | I love deadlines | > | I like the whooshing sound they make as they fly by. | > | | > | | > | | > | > | |
0 Likes
Message 5 of 9

Anonymous
Not applicable
Would this work for you? "Matt W" wrote in message news:4149946f$1_2@newsprd01... > Just an FYI: > > Using the following code to remove Layer Properties Filters, I've noticed > something kinda quirky. > On some of my drawings (mainly Land Desktop and Building Systems, both > 2005), it didn't work. > HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then it > works (same thing for the LSP equivalent that R Bell has posted before). > > I didn't realize it was case sensitive??!? > > Sub LayerFilterDelete() > Dim objDict As AcadDictionary > Dim objRec As AcadObject > If ThisDrawing.Layers.HasExtensionDictionary Then > Set objDict = ThisDrawing.Layers.GetExtensionDictionary > For Each objRec In objDict > If (objRec.Name = "ACAD_LAYERFILTERS") Or _ > (objRec.Name = "AcLyDictionary") Then objDict.Remove > objRec.Name > Next > End If > End Sub > > -- > I love deadlines > I like the whooshing sound they make as they fly by. > > >
0 Likes
Message 6 of 9

Anonymous
Not applicable
Isn't that for pre-2005?? -- I love deadlines I like the whooshing sound they make as they fly by. "Paul S" wrote in message news:4149b816$1_3@newsprd01... | Would this work for you? | | "Matt W" wrote in message | news:4149946f$1_2@newsprd01... | > Just an FYI: | > | > Using the following code to remove Layer Properties Filters, I've noticed | > something kinda quirky. | > On some of my drawings (mainly Land Desktop and Building Systems, both | > 2005), it didn't work. | > HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then it | > works (same thing for the LSP equivalent that R Bell has posted before). | > | > I didn't realize it was case sensitive??!? | > | > Sub LayerFilterDelete() | > Dim objDict As AcadDictionary | > Dim objRec As AcadObject | > If ThisDrawing.Layers.HasExtensionDictionary Then | > Set objDict = ThisDrawing.Layers.GetExtensionDictionary | > For Each objRec In objDict | > If (objRec.Name = "ACAD_LAYERFILTERS") Or _ | > (objRec.Name = "AcLyDictionary") Then objDict.Remove | > objRec.Name | > Next | > End If | > End Sub | > | > -- | > I love deadlines | > I like the whooshing sound they make as they fly by. | > | > | > | | |
0 Likes
Message 7 of 9

Anonymous
Not applicable
That may be. I am still in 2004 and it works for me. "Matt W" wrote in message news:4149bdd1$1_1@newsprd01... > Isn't that for pre-2005?? > > > -- > I love deadlines > I like the whooshing sound they make as they fly by. > > "Paul S" wrote in message > news:4149b816$1_3@newsprd01... > | Would this work for you? > | > | "Matt W" wrote in message > | news:4149946f$1_2@newsprd01... > | > Just an FYI: > | > > | > Using the following code to remove Layer Properties Filters, I've > noticed > | > something kinda quirky. > | > On some of my drawings (mainly Land Desktop and Building Systems, both > | > 2005), it didn't work. > | > HOWEVER, if I changed AcLyDictionary to ACLYDICTIONARY (all caps) then > it > | > works (same thing for the LSP equivalent that R Bell has posted before). > | > > | > I didn't realize it was case sensitive??!? > | > > | > Sub LayerFilterDelete() > | > Dim objDict As AcadDictionary > | > Dim objRec As AcadObject > | > If ThisDrawing.Layers.HasExtensionDictionary Then > | > Set objDict = ThisDrawing.Layers.GetExtensionDictionary > | > For Each objRec In objDict > | > If (objRec.Name = "ACAD_LAYERFILTERS") Or _ > | > (objRec.Name = "AcLyDictionary") Then objDict.Remove > | > objRec.Name > | > Next > | > End If > | > End Sub > | > > | > -- > | > I love deadlines > | > I like the whooshing sound they make as they fly by. > | > > | > > | > > | > | > | > >
0 Likes
Message 8 of 9

Anonymous
Not applicable
Matt, Something else in ADT/LDD/ABS recreates those dictionaries. I'm trying to get to the bottom of it. -- R. Robert Bell
0 Likes
Message 9 of 9

Anonymous
Not applicable
Okay....well as long as you're on top of it. :) -- I love deadlines I like the whooshing sound they make as they fly by. "R. Robert Bell" wrote in message news:4149e2f5$1_3@newsprd01... | Matt, | | Something else in ADT/LDD/ABS recreates those dictionaries. I'm trying to | get to the bottom of it. | | -- | R. Robert Bell | | |
0 Likes