faizur Posted September 9, 2022 Share Posted September 9, 2022 Here is a polyline, where I want to add vertical construction line to all vertex. Is it possible? Quote Link to comment Share on other sites More sharing options...
ronjonp Posted September 9, 2022 Share 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 Link to comment Share on other sites More sharing options...
BIGAL Posted September 9, 2022 Share 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 Link to comment Share on other sites More sharing options...
faizur Posted September 10, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
faizur Posted September 10, 2022 Author Share 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 Link to comment Share on other sites More sharing options...
ronjonp Posted September 10, 2022 Share Posted September 10, 2022 17 minutes ago, faizur said: Thanks Man, its work perfectly Quote Link to comment Share on other sites More sharing options...
aridzv Posted September 10, 2022 Share 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 Link to comment Share on other sites More sharing options...
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.