Layer Description

Discussion in 'AutoCAD' started by dndaas, Oct 27, 2004.

  1. dndaas

    dndaas Guest

    Hallo,

    Does anyone have code to add descriptions to a layer?
    Layerdescriptions appeared in AC2005, but I can’t seem to find an object property that allows me to add them.

    Thanx,
    Marc
     
    dndaas, Oct 27, 2004
    #1
  2. dndaas

    Jackrabbit Guest

    Specifies the description of an object.

    Signature

    object.Description

    object

    Layer, Linetype, TableStyle
    The object or objects this property applies to.

    Description

    String; read-write
    The description.

    Remarks

    A linetype description can have up to 47 characters. The description can be a comment or a series of underscores, dots, dashes, and spaces to show a simple representation of the linetype pattern.

    Example

    [pre]
    Sub Example_Description()
    ' This example returns the description of the active linetype.
    ' It then changes the description of the active linetype.

    Dim currDescription As String

    ' This example modifies the description of a linetype
    currDescription = ThisDrawing.ActiveLinetype.Description
    MsgBox "The description of the active LineType is: " & currDescription, vbInformation, "Description Example"

    ' Change the description of the active linetype
    ThisDrawing.ActiveLinetype.Description = "My favorite LineType"
    MsgBox "The new description of the active LineType is: " & ThisDrawing.ActiveLinetype.Description, vbInformation, "Description Example"

    ' Reset the description of the active linetype
    ThisDrawing.ActiveLinetype.Description = currDescription
    MsgBox "The description of the active LineType is reset to: " & ThisDrawing.ActiveLinetype.Description, vbInformation, "Description Example"
    End Sub
    [/pre]
     
    Jackrabbit, Oct 27, 2004
    #2
  3. dndaas

    dndaas Guest

    actually Thisdrawing.ActiveLayer.Description seems to work …..
     
    dndaas, Oct 28, 2004
    #3
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.