Results 1 to 9 of 9

Thread: make linetype continuous

  1. #1
    Member
    Join Date
    2009-05
    Location
    Mackay
    Posts
    18
    Login to Give a bone
    0

    Default make linetype continuous

    A line with linetype bylayer doesn't have a 6 in the dxf code table. Now I can extract the dxf stuff and use subst ( cons etc to modify the table, but the linetype code isn't there?
    How do I do this please?

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,804
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Quote Originally Posted by michael.lehmann.218283 View Post
    A line with linetype bylayer doesn't have a 6 in the dxf code table.
    You will have to query the layer, find its linetype, then go from there...
    R.K. McSwain | CAD Panacea |

  3. #3
    Active Member
    Join Date
    2007-03
    Posts
    57
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Code:
    (setq entlist (entget(car(entsel)))
          old_dxf (assoc 6 ent_list)
          new_dxf (cons 6 "Continuous" )
          )
    (entmod
      (if old_dxf
        (subst new_dxf old_dxf ent_list)
        (append entlist (list new_dxf))
        ) ;_ end of if
      )

  4. #4
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Quote Originally Posted by azarko View Post
    Code:
    (setq entlist (entget(car(entsel)))
          old_dxf (assoc 6 ent_list)
          new_dxf (cons 6 "Continuous" )
          )
    (entmod
      (if old_dxf
        (subst new_dxf old_dxf ent_list)
        (append entlist (list new_dxf))
        ) ;_ end of if
      )
    This does not answer the poster's question.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  5. #5
    I could stop if I wanted to
    Join Date
    2015-08
    Posts
    263
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Try this:
    Code:
    (cdr (assoc 6 (tblsearch "LAYER"(cdr (assoc 8 (entget (car 
    (entsel))))))))
    AH

  6. #6
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: make linetype continuous

    To clarify. If any entity has a ByLayer property (Colour or Linetype) then that won't be displayed in an entget list. So if (assoc 6 edata) fails, then you know it has a linetype of bylayer.

    Now to find out exactly what linetype it will show, you use abdulhuck's code.

    But to modify the line's linetype to something else than "ByLayer", you need to add a 6 group to the edata as per azarko's code.

    If by "modify the table" you mean you want to edit the layer's linetype. Then you need to obtain the layer name & use (command ".-Layer" ...). Or get the layer's table entry object and modify it (tip: check abdulhuck's code).

  7. #7
    Member
    Join Date
    2009-05
    Location
    Mackay
    Posts
    18
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Thats all, azarko that is what I was trying to do, just wasn't able to do it
    BTW, that code prints the dxf info to the screen, would
    (setvar "cmdecho" 0)
    get rid of it?

  8. #8
    Certifiable AUGI Addict
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Quote Originally Posted by michael.lehmann.218283 View Post
    Thats all, azarko that is what I was trying to do, just wasn't able to do it
    BTW, that code prints the dxf info to the screen, would
    (setvar "cmdecho" 0)
    get rid of it?
    No need, just add a (princ) to the end of your defun. That's "default" for creating a new command using something like:
    Code:
    (defun C:CommandName (/ entlist old_dxf new_dxf)
    ;; Copy Code here
      (princ) ;Ensure last line in function returns nothing
    )
    Otherwise any lisp function returns the last piece of data calculated. And if that is called from the command line it prints this data.

  9. #9
    Member
    Join Date
    2009-05
    Location
    Mackay
    Posts
    18
    Login to Give a bone
    0

    Default Re: make linetype continuous

    Thanks very much

Similar Threads

  1. linetype of cirlces only displaying as continuous
    By aletourneau in forum AutoCAD General
    Replies: 4
    Last Post: 2017-08-04, 04:52 PM
  2. Non Continuous Linetype Beginning and Ending Segments
    By autocad.wishlist1734 in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2015-10-08, 06:49 PM
  3. Linetype Scale Factor - Hidden Line remains continuous
    By Detsenira in forum AutoCAD General
    Replies: 10
    Last Post: 2006-09-01, 02:59 PM
  4. Replies: 7
    Last Post: 2006-06-19, 11:40 AM
  5. Replies: 6
    Last Post: 2006-03-31, 06:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •