See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How to change LW PolyLines to 2D PolyLines

  1. #1
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default How to change LW PolyLines to 2D PolyLines

    I have code written to change all lines to plines, but they are changing them to LW PLines and i need them to be 2D PLines. If there is a way please help.

    Here is the Code
    Code:
      (defun PLINECONVERT (/ OLDVAR1 LCOLOR COUNT LINENO SS1 ENT EDATA PT1 PT2)
    
       (alert "\nConverting lines to PLines\n")
      
       (command ".undo" "Mark")    
       (setq OLDVAR1 (getvar "CMDECHO")) (setvar "CMDECHO" 0) 
       (setvar "PLINEWID" (getreal "Enter Width for Plines: "))   
       (setq SS1 nil)   
       (setq SS1 (ssget "X" ' ((0 . "LINE"))))   
       (setq LINENO (sslength SS1))  
       (setq COUNT 0)
       (setq PLINFO (ssadd))         
       (repeat LINENO 
          (progn      
             (setq ENT (ssname SS1 COUNT))   
             (setq EDATA (entget ENT))    
             (setq PT1 ( cdr (assoc 10 EDATA))) 
             (setq PT2 ( cdr (assoc 11 EDATA))) 
            ; (setq LCOLOR (cdr (assoc 62 EDATA)))   
             (setq LLAYER (cdr (assoc 8 EDATA)))
             ;(if LCOLOR (princ) (setq LCOLOR "BYLAYER")) 
             (command "Color" LCOLOR ) 
             (command "Layer" "s" LLAYER "")
             (command "Pline" PT1 PT2 "")       
             (ssadd (entlast) PLINFO)        
             (prompt (strcat "Processing line no. " (itoa COUNT) "\r")) 
             (setq COUNT (1+ COUNT))        
          )
       )
       (COMMAND "ERASE" SS1 "")           
       (setvar "CMDECHO" OLDVAR1)         
       (prompt (strcat "\n" "Erasing original lines..." "\n"))
       (princ) ; end program
        (terpri)
    ); end convert.lsp

    All Help is appreciated.

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    What is your definition of a 2D pline? An LW pline is a 2D pline. It has one value for the height for all the vertices, and then each vertex is show in only (x,y) format.

  3. #3
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    Quote Originally Posted by T.Willey
    What is your definition of a 2D pline? An LW pline is a 2D pline. It has one value for the height for all the vertices, and then each vertex is show in only (x,y) format.
    I think the OP is referring to the older 2D POLYLINE object.
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  4. #4
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    Quote Originally Posted by Opie
    I think the OP is referring to the older 2D POLYLINE object.
    If so, then I don't think I can help. When I started to notice the different plines, I noticed that one is an LW pline, and one is a pline, with the reqular pline having vertices represented with (x,y,z).

  5. #5
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,106
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    The way you are creating the POLYLINEs, you may check into the system variable PLINETYPE. You could change it to 0 (zero).
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  6. #6
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    Yes I am talking about the older version of the 2D polyline and I will check the variable to see if that helps. Is there a way to take existing lw plines and change them to the old 2D plines.
    Last edited by Lions60; 2006-07-24 at 04:32 PM.

  7. #7
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    There is a command "convert" in 2006, in earlier versions I thought it was "convertpline".

  8. #8
    I could stop if I wanted to
    Join Date
    2006-07
    Posts
    233
    Login to Give a bone
    1

    Default Re: How to change LW PolyLines to 2D PolyLines

    Yes, i found an undocumented command in autocad that lets you convert strictly lw plines to heavy-weight plines(2d plines) it is convertpoly.

  9. #9
    Member
    Join Date
    2004-09
    Posts
    5
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    The only reason I can see to change a LW polyline to the older object type is that the vertices of the old-style polyline can be selected and edited with AutoLisp, as they appear as subentities. Is there any way to do this (change a width of a picked segment, for instance) to a LW polyline?

    Anssi

  10. #10
    Woo! Hoo! my 1st post
    Join Date
    2007-03
    Posts
    1
    Login to Give a bone
    0

    Default Re: How to change LW PolyLines to 2D PolyLines

    Does somebody know to to convert plines onto lw plines?
    Thank you

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 2014-08-05, 08:51 PM
  2. Polylines with arcs to polylines with segments
    By randyspear in forum AutoCAD General
    Replies: 1
    Last Post: 2009-04-15, 06:22 PM
  3. Replies: 7
    Last Post: 2008-02-22, 04:13 PM
  4. How to convert 3D Polylines to 2D Polylines
    By GreyHippo in forum AutoLISP
    Replies: 16
    Last Post: 2007-01-04, 05:32 PM
  5. How to Change elliptical arcs into Polylines
    By Lions60 in forum AutoLISP
    Replies: 11
    Last Post: 2006-08-01, 06:56 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
  •