Discussion:
Changing Wipeout Colors
(too old to reply)
Brian Hailey
2005-03-13 19:22:20 UTC
Howdy all,

I'm trying to change the color of all wipeouts in a drawing to 11 which
doesn't plot. I'm having a hard time figuring out how to do this and I'm
sure it's something really simple. Here's what I have so far:

Option Explicit


Public Sub wipeout11()
On Error Resume Next
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
Sset.Clear
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.SelectOnScreen FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor.ColorIndex = 11
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
End Sub


Any suggestions would be great!

Thanks,
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Paul Richardson
2005-03-13 21:00:43 UTC
Brian, Cleaner to set the "wipeout" layer to no-plot but..

Option Explicit

Public Sub wipeout11()
On Error Resume Next
Dim color As AcadAcCmColor
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant

Set color = _
AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Call color.SetRGB(255, 127, 127)

Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.Select acSelectionSetAll, , , FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor = color
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
ThisDrawing.SelectionSets("wipeout").Delete
End Sub
Post by Brian Hailey
Howdy all,
I'm trying to change the color of all wipeouts in a drawing to 11 which
doesn't plot. I'm having a hard time figuring out how to do this and I'm
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
Sset.Clear
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.SelectOnScreen FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor.ColorIndex = 11
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
End Sub
Any suggestions would be great!
Thanks,
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Paul Richardson
2005-03-14 00:01:50 UTC
ah... I removed having to select the objects
since you need them all anyway.. gl
Hi Paul,
Thanks for the help. If I set the wipeout layer to no plot, the wipeouts
will not plot (i.e. won't wipe out). If I set them to a color that
doesn't plot, the frames won't plot if left on but the wipeout will still
"wipe out". I'll give this a try and see how it works.
Again, thanks.
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Post by Paul Richardson
Brian, Cleaner to set the "wipeout" layer to no-plot but..
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim color As AcadAcCmColor
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Set color = _
AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Call color.SetRGB(255, 127, 127)
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.Select acSelectionSetAll, , , FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor = color
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
ThisDrawing.SelectionSets("wipeout").Delete
End Sub
Post by Brian Hailey
Howdy all,
I'm trying to change the color of all wipeouts in a drawing to 11 which
doesn't plot. I'm having a hard time figuring out how to do this and
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
Sset.Clear
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.SelectOnScreen FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor.ColorIndex = 11
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
End Sub
Any suggestions would be great!
Thanks,
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Brian Hailey
2005-03-13 23:50:45 UTC
Hi Paul,

Thanks for the help. If I set the wipeout layer to no plot, the wipeouts
will not plot (i.e. won't wipe out). If I set them to a color that doesn't
plot, the frames won't plot if left on but the wipeout will still "wipe
out". I'll give this a try and see how it works.

Again, thanks.
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Post by Paul Richardson
Brian, Cleaner to set the "wipeout" layer to no-plot but..
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim color As AcadAcCmColor
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Set color = _
AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Call color.SetRGB(255, 127, 127)
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.Select acSelectionSetAll, , , FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor = color
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
ThisDrawing.SelectionSets("wipeout").Delete
End Sub
Post by Brian Hailey
Howdy all,
I'm trying to change the color of all wipeouts in a drawing to 11 which
doesn't plot. I'm having a hard time figuring out how to do this and I'm
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
Sset.Clear
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.SelectOnScreen FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor.ColorIndex = 11
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
End Sub
Any suggestions would be great!
Thanks,
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Brian Hailey
2005-03-14 00:09:59 UTC
Thanks for the help, Paul. You put me in the right direction. Your method
didn't quite work as the RGB color still plotted. What I did was:

Set Color = AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Color.ColorIndex = 11

And that did the trick.
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM
Post by Paul Richardson
Brian, Cleaner to set the "wipeout" layer to no-plot but..
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim color As AcadAcCmColor
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0) As Integer
Dim FilterData(0) As Variant
Set color = _
AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")
Call color.SetRGB(255, 127, 127)
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.Select acSelectionSetAll, , , FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor = color
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
ThisDrawing.SelectionSets("wipeout").Delete
End Sub
Post by Brian Hailey
Howdy all,
I'm trying to change the color of all wipeouts in a drawing to 11 which
doesn't plot. I'm having a hard time figuring out how to do this and I'm
Option Explicit
Public Sub wipeout11()
On Error Resume Next
Dim Sset As AcadSelectionSet
Dim oAcadObject As AcadEntity
Dim FilterType(0 To 0) As Integer
Dim FilterData(0 To 0) As Variant
Set Sset = ThisDrawing.SelectionSets.Item("wipeout")
If Error <> "" Then
Set Sset = ThisDrawing.SelectionSets.Add("wipeout")
End If
Sset.Clear
FilterType(0) = 0: FilterData(0) = "wipeout"
Sset.SelectOnScreen FilterType, FilterData
For Each oAcadObject In Sset
oAcadObject.TrueColor.ColorIndex = 11
oAcadObject.Update
Next oAcadObject
ThisDrawing.Regen (acAllViewports)
End Sub
Any suggestions would be great!
Thanks,
--
Brian Hailey
LDT2005
C3D2005
XP Pro - SP 2
P4 2.8GHz
1.00 GB of RAM