Changing Wipeout Colors

Discussion in 'AutoCAD' started by Brian Hailey, Mar 13, 2005.

  1. Brian Hailey

    Brian Hailey Guest

    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
     
    Brian Hailey, Mar 13, 2005
    #1
  2. 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
     
    Paul Richardson, Mar 13, 2005
    #2
  3. Brian Hailey

    Brian Hailey Guest

    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
     
    Brian Hailey, Mar 13, 2005
    #3
  4. ah... I removed having to select the objects
    since you need them all anyway.. gl
     
    Paul Richardson, Mar 14, 2005
    #4
  5. Brian Hailey

    Brian Hailey Guest

    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
     
    Brian Hailey, Mar 14, 2005
    #5
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.