DESCRIPTIONS IN THE LAYER DIALOGUE BOX

Discussion in 'AutoCAD' started by JOE_W, Dec 2, 2004.

  1. JOE_W

    JOE_W Guest

    IN AUTOCAD 2005 A USER CAN INPUT A DESCRIPTION FOR A LAYER IN THE LAYER DIALOGUE BOX. I WANT TO BE ABLE TO DO THIS WITH AUTOLISP OR VISUALISP WHEN I SETUP A DRAWING. I DO NOT WANT TO USE TEMPLATES. CAN ANYONE HELP ME ACCESS THE DXF CODES FOR THE LAYER DESCRIPTION? I CAN NOT USE THE LAYER COMMAND ON THE COMMAND PROMPT BECAUSE THERE IS NOT AN OPTION FOR DESCRIPTION. ANY HELP WILL BE APPRECIATED.
     
    JOE_W, Dec 2, 2004
    #1
  2. Easy on those caps!

    Its simply EED with an APPID of "AcAecLayerStandard".

    Or grab LAYERDES.VLX from the free stuff section of
    http://www.dotsoft.com and script it.

    Terry
     
    Terry W. Dotson, Dec 3, 2004
    #2
  3. JOE_W

    JOE_W Guest

    Thanks!

    "Its simply EED with an APPID of "AcAecLayerStandard"."
    ???duh

    Any Chance of you posting the raw code to that one?
     
    JOE_W, Dec 3, 2004
    #3
  4. JOE_W

    Rob Guest

    Joe_W,

    Here's what I have been doing since AutoCAD 9 days.

    A simple startup routine that creates the minimum layers I need each time a
    drawing loads....

    ;(SAFE_LAYERS) Create/restore Standard Layers
    (defun safe_layers ()
    (command "._LAYER" "_m" "$HATCH$" "_c" "33" "$HATCH$" "_p" "NO" "$HATCH$"
    "") ; Hatching
    (command "._LAYER" "_m" "$CN$" "_c" "33" "$CN$" "_p" "NO" "$CN$"
    "") ; Construction
    (command "._LAYER" "_m" "DOT" "_c" "2" "DOT" "_l" "DOT" "DOT"
    "") ; Dotted Line
    (command "._LAYER" "_m" "CL" "_c" "1" "CL" "_l" "CENTRE" "CL"
    "") ; Centre Line
    (command "._LAYER" "_m" "H4" "_c" "9" "H4" "") ; Hatch 4 (Greyscale)
    (command "._LAYER" "_m" "T1" "_c" "2" "T1" "") ; Normal Text Layer
    (command "._LAYER" "_m" "T2" "_c" "3" "T2" "") ; Small Text Layer
    (command "._LAYER" "_m" "T3" "_c" "4" "T3" "") ; Head Text Layer
    (command "._LAYER" "_m" "DI" "_c" "1" "DI" "") ; Dimensioning Layer
    (command "._LAYER" "_m" "PA" "_c" "4" "PA" "") ; Concrete Panel
    (command "._LAYER" "_m" "FE" "_c" "7" "FE" "") ; Ferrule Layer
    (command "._LAYER" "_m" "D" "_c" "7" "D" "") ; Ferrule CL Layer
    (princ))
    ;

    My startup app (dropped in Appload Contents) runs (safe_layers) and much
    much more ;-))
    ie I have global.lsp with many startups such as
    (safe_layers)(safe_linetypes)(safe_tesxtstyles) etc etc...
    I then always have what I need.

    Hope this helps.

    Rob.
     
    Rob, Dec 3, 2004
    #4
  5. JOE_W

    Rudy Tovar Guest

    ;Useage (masi-new-layer name descrip)

    (defun masi-new-layer ( layer description / ms ob)
    (setq ms (vla-get-layers
    (vla-get-activedocument (vlax-get-acad-object))
    )
    )
    (vlax-dump-object ms t)
    (setq ob (vla-add ms layer))
    (vla-put-description ob description)
    (princ)
    )
     
    Rudy Tovar, Dec 3, 2004
    #5
  6. JOE_W

    Rudy Tovar Guest

    oops, drop the (vlax-dump-object ms t)


     
    Rudy Tovar, Dec 3, 2004
    #6
  7. JOE_W

    JOE_W Guest

    THANKS!
     
    JOE_W, Dec 3, 2004
    #7
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.