faizur Posted September 9, 2022 Posted September 9, 2022 Here is a polyline, where I want to add vertical construction line to all vertex. Is it possible? Quote
ronjonp Posted September 9, 2022 Posted September 9, 2022 (edited) Give this a try: (defun c:foo (/ s) ;; RJP » 2022-09-09 ;; Generate vertical xlines on polyline vertexes (if (setq s (ssget '((0 . "LWPOLYLINE")))) (progn (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (foreach p (vl-remove-if '(lambda (x) (/= 10 (car x))) (entget e)) (entmakex (list '(0 . "XLINE") '(100 . "AcDbEntity") '(67 . 0) '(8 . "XLINE") '(100 . "AcDbXline") p '(11 0.0 1.0 0.0) ) ) ) ) ;; Make layer not plot and color 128,128,128 (entmod (append (entget (tblobjname "LAYER" "XLINE")) '((290 . 0) (420 . 8421504)))) ) ) (princ) ) Edited September 9, 2022 by ronjonp 3 Quote
BIGAL Posted September 9, 2022 Posted September 9, 2022 (edited) Are you trying to draw some form of cross or long section, with values ? Edited September 9, 2022 by BIGAL Quote
faizur Posted September 10, 2022 Author Posted September 10, 2022 2 hours ago, BIGAL said: Are you trying to draw some form of cross or long section, with values ? Yes, creating road profile. Quote
faizur Posted September 10, 2022 Author Posted September 10, 2022 10 hours ago, ronjonp said: Give this a try: (defun c:foo (/ s) ;; RJP » 2022-09-09 ;; Generate vertical xlines on polyline vertexes (if (setq s (ssget '((0 . "LWPOLYLINE")))) (progn (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (foreach p (vl-remove-if '(lambda (x) (/= 10 (car x))) (entget e)) (entmakex (list '(0 . "XLINE") '(100 . "AcDbEntity") '(67 . 0) '(8 . "XLINE") '(100 . "AcDbXline") p '(11 0.0 1.0 0.0) ) ) ) ) ;; Make layer not plot and color 128,128,128 (entmod (append (entget (tblobjname "LAYER" "XLINE")) '((290 . 0) (420 . 8421504)))) ) ) (princ) ) Thanks Man, its work perfectly Quote
ronjonp Posted September 10, 2022 Posted September 10, 2022 17 minutes ago, faizur said: Thanks Man, its work perfectly Quote
aridzv Posted September 10, 2022 Posted September 10, 2022 (edited) @faizur in addition to @ronjonp clean and simple solution, take a look here regards, aridzv. Edited September 10, 2022 by aridzv 1 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.