Jump to content

Autocad 2008 - turn simple lines (2D) to 3D lines


Recommended Posts

Posted

At least you can break 3d polylines with Pedit :D

  • Replies 28
  • Created
  • Last Reply

Top Posters In This Topic

  • iuliandonici

    10

  • eldon

    5

  • fuccaro

    4

  • ReMark

    4

Posted

@ReMark: I didn't think of doing that. But, I tried it now and it doesn't work even if I freeze the other layers. It's not exactly what I need.

Posted

Did you even bother to try the lisp in the thread I linked?

Posted

I got some time and access to an AutoCAD seat. Here is a better code: it will preserve the layering and it doesn't care about the Osnap. Is it what you need, Iulian?

(defun c:ltp()
 (setq ss (ssget "X" '((0 . "LINE")))
   i (sslength ss))
 (repeat i
   (setq e (ssname ss (setq i (1- i)))
     el (entget e))
   (entmake (list '(0 . "POLYLINE")
          (assoc 8 el)
          '(10 0.0 0.0 0.0)
          '(70 . ))
   (entmake (list '(0 . "VERTEX")
          '(67 . 0)
          (assoc 8 el)
          (assoc 10 el)
          '(70 . 32)'(50 . 0.0)))
   (entmake (list '(0 . "VERTEX")
          '(67 . 0)
          (assoc 8 el)
          (cons 10 (cdr (assoc 11 el)))
          '(70 . 32)'(50 . 0.0)))
    (entmake '((0 . "SEQEND")))
   (entdel e)
   )
 (princ)
 )

Again: operate on a copy of the drawing, for just in case.

The program starts by typing LTP (lower or upper case), it stands for "Line To Polyline"

Posted

@fucarro: It does work. Listen, Fuccaro, I truely hope one day I would master this VBA scripting.

 

Thank you. Thank you very much.

Posted

Actually, Fucarro, you might have just saved my job! People like you on Cadtutor tend to... save jobs, really. I'm very new to Autocad (2008 Mechanical) but the effort and support you give to people, truely makes Cadtutor a valuable Autocad resource!

 

Thank you, once again!

Posted

I am really glad to be helped, Iulian! And thanks for the feed-back.

If you like this forum, hang around, get as much help as you need and also you may try to contribute.

Posted

Oh, Fucarro, I would love to contribute when I'll have some more consistent Autocad knowledge (which, now, is not the case) and, by the way... MULTUMESC, DIN NOU ;).

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...