Trap3d Posted June 27, 2023 Posted June 27, 2023 21 hours ago, Tharwat said: No worries, try it and let me know. (defun c:Test (/ n c f i s e o) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (setq n "Layer" ;; Target layer name. ;; c 232 ;; Colour of Layer. ;; f 0.8 ;; Offset distance. ;; ) (and (or (tblsearch "LAYER" n) (entmake (list '(0 . "LAYER") '(100 . "AcDbSymbolTableRecord") '(100 . "AcDbLayerTableRecord") (cons 2 n) (cons 62 c) '(70 . 0) ) ) ) (setq i -1 s (ssget "_X" (list (cons 410 (getvar 'CTAB)) '(0 . "LWPOLYLINE") '(-4 . "&=") '(70 . 1) ) ) ) (while (setq i (1+ i) e (ssname s i) ) (and (setq g (entget e) o (entlast) ) (vlax-write-enabled-p (vlax-ename->vla-object e)) (vl-cmdf "_.OFFSET" f e "_none" (mapcar (function (lambda (j k) (* (+ j k) 0.5))) (vlax-curve-getstartpoint e) (vlax-curve-getpointatparam e 2) ) "" ) (not (= o (setq o (entlast)))) (entmod (subst (cons 8 n) (assoc 8 (setq e (entget o))) e)) ) ) ) (princ) ) (vl-load-com) Thanks, it worked fine 1 Quote
Tharwat Posted June 27, 2023 Posted June 27, 2023 31 minutes ago, Trap3d said: Thanks, it worked fine Excellent, you are welcome anytime. 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.