Lineweight Properties HELP

Discussion in 'AutoCAD' started by keithwaite, May 5, 2004.

  1. keithwaite

    keithwaite Guest

    When putting in the code for the Lineweight of a new Layer it will only accept the wights that are listed in the VBA Help > Lineweight Property

    Example:
    Dim objNewLayer As AcadLayer
    Set objNewLayer = ThisDrawing.Layers.Add("AREA")
    objNewLayer.Lineweight = acLnWt008

    I want to put in the following = acLnWt008 but when I do, I get the following Error:
    Microsoft Visual Basic
    Compile Error
    Variable not defined

    What do I need to do to define this Lineweight?

    Thanks,
    Keith
     
    keithwaite, May 5, 2004
    #1
  2. keithwaite

    Jeff Mishler Guest

    accept the wights that are listed in the VBA Help > Lineweight Property
     
    Jeff Mishler, May 5, 2004
    #2
  3. keithwaite

    Jeff Mishler Guest

    Well, I'll try to actually type something before sending this time.....

    Lineweights are hardcoded values. You can't create a new weight.........use
    the ones provided.

    Jeff

    accept the wights that are listed in the VBA Help > Lineweight Property
     
    Jeff Mishler, May 5, 2004
    #3
  4. This is not the "proper" answer, but FWIW, in ACAD 2002 the constants are as
    follows:

    acLnWt000 = 0
    acLnWt008 = 8
    etc...
    acLnWt211 = 211

    and the special ones are:
    acLnWtByLayer = -1
    acLnWtByBlock = -2
    acLnWtByLwDefault = -3

    James
     
    James Belshan, May 5, 2004
    #4
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.