Invalid layer message

Discussion in 'AutoCAD' started by Jeff Mishler, Aug 6, 2004.

  1. Jeff Mishler

    Jeff Mishler Guest

    You can't use the "Freeze" method on the current layer.
    Change the line "objlayer.Freeze = False" to:
    If objLayer.Name <> ThisDrawing.ActiveLayer.Name Then objLayer.Freeze =
    False
     
    Jeff Mishler, Aug 6, 2004
    #1
  2. why am I getting invalid layer error message

    ' Change layer Properties

    Dim Acadlayers As Acadlayers
    Dim objLayer As Acadlayer

    Set Acadlayers = ThisDrawing.Layers

    For Each objLayer In Acadlayers
    'change properties of objLayer here...
    objLayer.Freeze = False
    objLayer.LayerOn = True
    objLayer.Lock = False
    objLayer.Color = 8
     
    Leonard Johnson, Aug 6, 2004
    #2
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.