What code dxf for linetype

Discussion in 'AutoCAD' started by Adesu, Aug 11, 2004.

  1. Adesu

    Adesu Guest

    Dear Alls,I would change linetype from continuous to dashed,what type code
    for dxf line,anybody care it,thanks for your help
    Best regards
    Ade Suharna

    ; mel is stand for making edit line
    ; Design by Ade Suharna
    ; 02 August 2004
    ; Edit by Ade Suharna 05/08/2004
    (defun c:mel (/ ent1 ent2 opt ent3 ed)
    (setq ent1 (entget (car (entsel "\nSELECT LINE: ")))
    ent2 (cdr (assoc 11 ent1))
    opt (getreal "\nENTER LENGTH FOR NEW LINE: ")
    ent3 (subst opt (nth 0 ent2) ent2)
    ed (subst (cons 11 ent3)(assoc 11 ent1) ent1))
    (entmod ed)
    (princ)
    )
     
    Adesu, Aug 11, 2004
    #1
  2. Check out the online DXF Manual in Help, it's all in there.
     
    Allen Johnson, Aug 13, 2004
    #2
  3. Adesu

    Paul Turvill Guest

    6
    ___
     
    Paul Turvill, Aug 13, 2004
    #3
  4. Adesu

    Adesu Guest

    ((-1 . <Entity name: 14f7510>) (0 . "LINE") (330 . <Entity name: 14f5cd0>)
    (5 . "56972") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 .
    "DIMENSION") (100 . "AcDbLine") (10 32.739 176.606 0.0) (11 236.452 176.606
    0.0) (210 0.0 0.0 1.0))
    _$
    Hi Paul,I'm not found code 6,what happen ?
     
    Adesu, Aug 16, 2004
    #4
  5. Adesu

    ECCAD Guest

    Command: (setq aa (entsel))

    Select object: (<Entity name: 40078f40> (7.0625 11.125 0.0))
    Adesu,
    R2002, sample using entget:

    Command: (setq aa (entget (car aa)))
    ((-1 . <Entity name: 40078f40>) (0 . "LINE") (330 . <Entity name: 40078cc0>) (5
    "90") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (6 .
    "Continuous") (100 . "AcDbLine") (10 2.4375 11.125 0.0) (11 10.5625 11.125 0.0)
    (210 0.0 0.0 1.0))

    Sample using ssget:
    Command: (setq ss (ssget))

    Select objects: 1 found

    Select objects:
    <Selection set: 2>

    Command: (setq ln (entget (ssname ss 0)))
    ((-1 . <Entity name: 40078f40>) (0 . "LINE") (330 . <Entity name: 40078cc0>) (5
    "90") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "0") (6 .
    "Continuous") (100 . "AcDbLine") (10 2.4375 11.125 0.0) (11 10.5625 11.125 0.0)
    (210 0.0 0.0 1.0))

    What version / type of Autocad you got ?
    How you getting the 'entity' list ?

    Bob
     
    ECCAD, Aug 16, 2004
    #5
  6. Adesu

    Adesu Guest

    AutoCAD 2000
    (setq ent1 (entget (car (entsel "\nSELECT LINE: "))))
     
    Adesu, Aug 16, 2004
    #6
  7. I expect there's no code 6 if the entity's linetype is Bylayer, but only if
    it has an explicit linetype assigned. You can "extract" that information,
    too, with an "if" operation to set a variable to Bylayer if there is no code
    6 in the entity list.

    Kent Cooper, AIA
     
    Kent Cooper, AIA, Aug 16, 2004
    #7
  8. Adesu

    Paul Turvill Guest

    Code group 6 appears only if the linetype is set to other than BYLAYER. To
    set a specific linetype with an (entmake) or (entmod) call you can (append)
    a group 6 to the entity list.
    ___
     
    Paul Turvill, Aug 16, 2004
    #8
  9. Adesu

    Adesu Guest

    _$ (setq ss (ssget))
    <Selection set: a>
    _$ (setq ln (entget (ssname ss 0)))
    ((-1 . <Entity name: 14a09b8>) (0 . "LINE") (330 . <Entity name: 14a08f8>)
    (5 . "4F") (100 . "AcDbEntity") (67 . 0) (410 . "Model") (8 . "Layer1") (62
    .. 0) (6 . "DASHED") (370 . -3) (100 . "AcDbLine") (10 3.83828 9.34361 0.0)
    (11 16.3922 9.34361 0.0) (210 0.0 0.0 1.0))

    Hi Paul and others,I've got it,how to got "(6 . "DASHED")"
    here procedure ;
    1. Display Linetype manager
    2. Click load "dashed" line
    3.Create line dashed type
    4. check by "(setq ss (ssget))" and "(setq ln (entget (ssname ss 0)))"
     
    Adesu, Aug 23, 2004
    #9
  10. Adesu

    Adesu Guest

    This code can't displayed if ,user not yet load a line in Linetype manager
     
    Adesu, Aug 23, 2004
    #10
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.