tuantrinhdp Posted July 21, 2021 Posted July 21, 2021 (edited) Hello. I want to convert 2D polyline to 3D polyline with text at vertex. Can you help me? Edited July 21, 2021 by tuantrinhdp Quote
BIGAL Posted July 21, 2021 Posted July 21, 2021 When asking for help it is best to post a sample dwg so some one may have a answer already that matches your request. Quote
tuantrinhdp Posted July 22, 2021 Author Posted July 22, 2021 Yes, i attached sample dwg. Drawing1.dwg Quote
Trudy Posted July 22, 2021 Posted July 22, 2021 if i understand right this text is the elevation ? Quote
tuantrinhdp Posted July 22, 2021 Author Posted July 22, 2021 Quote 3 hours ago, Trudy said: if i understand right this text is the elevation ? Yes. Quote
BIGAL Posted July 23, 2021 Posted July 23, 2021 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) ) Quote
tuantrinhdp Posted July 23, 2021 Author Posted July 23, 2021 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. Quote
Recommended Posts
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.