Jump to content

How to Convert 2D PL to 3D PL with text at vertex?


Recommended Posts

Posted (edited)

Hello. I want to convert 2D polyline to 3D polyline with text at vertex. Can you help me? 
 

Untitled.png

Edited by tuantrinhdp
Posted

When asking for help it is best to post a sample dwg so some one may have a answer already that matches your request.

Posted

if i understand right this text is the elevation ?

Posted
Quote
3 hours ago, Trudy said:

if i understand right this text is the elevation ?

 

Yes. 

Posted

Just a quick one, will create 3dpoly, based on insertion point of text is Z point. Probably add a draw on a layer. Can add delete old pline.

 

(defun c:test ( / ss ent pt txt lst)
(defun AHpllst ( plst / x)
(command "3dpoly")
(while (= (getvar "cmdactive") 1 )
(repeat (setq x (length plst))
(command (nth (setq x (- x 1)) plst))
)
(command "")
)
)

(setq oldlay (getvar 'clayer))

(setq ss (ssget (list (cons 0 "TEXT"))))

(setq lst '())

(repeat (setq x (sslength ss))
    (setq ent (entget (ssname ss (setq x (1- x)))))
    (setq pt (cdr (assoc 10 ent)))
    (setq txt (cdr (assoc 1 ent)))
    (setq lst (cons (list (car pt) (cadr pt)(atof txt)) lst))
)

;(setvar 'clayer "yourlayename")
(ahpllst lst)

(setvar 'clayer oldlay)
(princ)
)

 

Posted
9 hours ago, BIGAL said:

Just a quick one, will create 3dpoly, based on insertion point of text is Z point. Probably add a draw on a layer. Can add delete old pline.

 


(defun c:test ( / ss ent pt txt lst)
(defun AHpllst ( plst / x)
(command "3dpoly")
(while (= (getvar "cmdactive") 1 )
(repeat (setq x (length plst))
(command (nth (setq x (- x 1)) plst))
)
(command "")
)
)

(setq oldlay (getvar 'clayer))

(setq ss (ssget (list (cons 0 "TEXT"))))

(setq lst '())

(repeat (setq x (sslength ss))
    (setq ent (entget (ssname ss (setq x (1- x)))))
    (setq pt (cdr (assoc 10 ent)))
    (setq txt (cdr (assoc 1 ent)))
    (setq lst (cons (list (car pt) (cadr pt)(atof txt)) lst))
)

;(setvar 'clayer "yourlayename")
(ahpllst lst)

(setvar 'clayer oldlay)
(princ)
)

 

Thank you so much. 

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...