| Author |
Message |
Chris Shoemaker
Guest
|
Posted:
Wed Mar 16, 2005 2:42 am Post subject:
Removing / Changing the Layer of Seqends |
|
|
well i've got a routine that goes through and sets all entities in block
defintions to layer 0, however it doesn't seem to change seqends in the
blocks too, leaving some otherwise unused layers unpurgable. Any idea how to
change the layer of these seqends at the same time as the entities so unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
| Back to top |
|
 |
Jeff Mishler
Guest
|
Posted:
Wed Mar 16, 2005 3:43 am Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
See the solution posted by KG in response to the similar question posted on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
| Quote: | well i've got a routine that goes through and sets all entities in block
defintions to layer 0, however it doesn't seem to change seqends in the
blocks too, leaving some otherwise unused layers unpurgable. Any idea how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
Chris Shoemaker
Guest
|
Posted:
Wed Mar 16, 2005 4:04 am Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
hmm, my news reader can't seem to find posts further back then sept of 2004,
any idea where i could find that information? Thanks :-)
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4237652a_3@newsprd01...
| Quote: | See the solution posted by KG in response to the similar question posted
on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
well i've got a routine that goes through and sets all entities in block
defintions to layer 0, however it doesn't seem to change seqends in the
blocks too, leaving some otherwise unused layers unpurgable. Any idea
how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and
unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to
bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
Chris Shoemaker
Guest
|
Posted:
Wed Mar 16, 2005 4:05 am Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
oops, nevermind...just realized i don't know how to use my client. Thanks
:-)
-Chris
"Chris Shoemaker" <css@leapc.com> wrote in message
news:42376a78_1@newsprd01...
| Quote: | hmm, my news reader can't seem to find posts further back then sept of
2004,
any idea where i could find that information? Thanks :-)
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4237652a_3@newsprd01...
See the solution posted by KG in response to the similar question posted
on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing
the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
well i've got a routine that goes through and sets all entities in
block
defintions to layer 0, however it doesn't seem to change seqends in
the
blocks too, leaving some otherwise unused layers unpurgable. Any idea
how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and
unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to
bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to
bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
Chris Shoemaker
Guest
|
Posted:
Wed Mar 16, 2005 8:59 pm Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
Actually, i still can't seem to find that post :-(
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4237652a_3@newsprd01...
| Quote: | See the solution posted by KG in response to the similar question posted
on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
well i've got a routine that goes through and sets all entities in block
defintions to layer 0, however it doesn't seem to change seqends in the
blocks too, leaving some otherwise unused layers unpurgable. Any idea
how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and
unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to
bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
Jeff Mishler
Guest
|
Posted:
Wed Mar 16, 2005 10:51 pm Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
Here's a link to it in the web format......
http://discussion.autodesk.com/thread.jspa?messageID=2198981
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:42385861$1_2@newsprd01...
| Quote: | Actually, i still can't seem to find that post :-(
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4237652a_3@newsprd01...
See the solution posted by KG in response to the similar question posted
on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing
the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
well i've got a routine that goes through and sets all entities in
block
defintions to layer 0, however it doesn't seem to change seqends in the
blocks too, leaving some otherwise unused layers unpurgable. Any idea
how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and
unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to
bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
Chris Shoemaker
Guest
|
Posted:
Wed Mar 16, 2005 11:29 pm Post subject:
Re: Removing / Changing the Layer of Seqends |
|
|
awesome, thanks :-)
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:42387203$1_3@newsprd01...
| Quote: | Here's a link to it in the web format......
http://discussion.autodesk.com/thread.jspa?messageID=2198981
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:42385861$1_2@newsprd01...
Actually, i still can't seem to find that post :-(
-Chris
"Jeff Mishler" <jeff_m@cadvault.com> wrote in message
news:4237652a_3@newsprd01...
See the solution posted by KG in response to the similar question
posted
on
Mar. 1, 2004 by Brent. The Title of the thread is "Removing / Changing
the
Layer of Seqends"
--
Jeff
check out www.cadvault.com
"Chris Shoemaker" <css@leapc.com> wrote in message
news:4237575f$1_1@newsprd01...
well i've got a routine that goes through and sets all entities in
block
defintions to layer 0, however it doesn't seem to change seqends in
the
blocks too, leaving some otherwise unused layers unpurgable. Any idea
how
to
change the layer of these seqends at the same time as the entities so
unused
layers can be purged?
-Chris
--------------------------------------------------------------
Private Sub cleanblocks()
Dim objBlock As AcadBlock
Dim objEnt As AcadEntity
Dim objLayer As AcadLayer
Dim layerlocked As Boolean
Dim layername As String
On Error Resume Next
'For every block definition in drawing
For Each objBlock In ThisDrawing.Blocks
'Make sure the block def isn't an xref or layout
If (objBlock.IsLayout = False) And (objBlock.IsXRef = False) Then
'For every entity in block defintion
For Each objEnt In objBlock
' Check if object layer is locked, if true set flag and
unlock
layername = objEnt.Layer
Set objLayer = ThisDrawing.Layers(layername)
If objLayer.Lock = True Then
layerlocked = True
objLayer.Lock = False
Else
layerlocked = False
End If
' If box is checked, set all block entities color to
bylayer
If Blocks_Color_ByLayer.Value = True Then
objEnt.color = acByLayer
End If
' If box is checked, set all block entities linetype to
bylayer
If Blocks_Linetype_ByLayer.Value = True Then
objEnt.Linetype = "ByLayer"
End If
' If box is checked, set all block entities lineweight to
bylayer
If Blocks_Lineweight_ByLayer.Value = True Then
objEnt.Lineweight = acLnWtByLayer
End If
' If box is checked, set all block entities layer to 0
If Blocks_Force_Layer0.Value = True Then
objEnt.Layer = "0"
End If
' If block was on locked layer, relock layer
If layerlocked = True Then
objLayer.Lock = True
End If
Next objEnt
End If
Next objBlock
' uncheck all the buttons
Blocks_Color_ByLayer.Value = False
Blocks_Linetype_ByLayer.Value = False
Blocks_Lineweight_ByLayer.Value = False
Blocks_Force_Layer0.Value = False
Blocks_Delete_Text.Value = False
End Sub
|
|
|
| Back to top |
|
 |
|
|
|
|