tuantrinhdp Posted January 30, 2023 Posted January 30, 2023 Hi erveyone. Please help me write lisp convert block to point. test.dwg Quote
Tharwat Posted January 30, 2023 Posted January 30, 2023 Are you after replacing blocks with point objects ? 1 Quote
Tharwat Posted January 30, 2023 Posted January 30, 2023 (defun c:Test (/ int sel ent get ) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (princ "\nSelect blocks to replace them with point objects : ") (setq int -1 sel (ssget "_:L" '((0 . "INSERT")))) (while (setq int (1+ int) ent (ssname sel int)) (and (setq get (entget ent)) (entmake (list '(0 . "POINT") (assoc 10 get) (assoc 8 get))) (entdel ent) ) ) ) (princ) ) 1 Quote
tuantrinhdp Posted January 30, 2023 Author Posted January 30, 2023 3 minutes ago, Tharwat said: (defun c:Test (/ int sel ent get ) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (princ "\nSelect blocks to replace them with point objects : ") (setq int -1 sel (ssget "_:L" '((0 . "INSERT")))) (while (setq int (1+ int) ent (ssname sel int)) (and (setq get (entget ent)) (entmake (list '(0 . "POINT") (assoc 10 get) (assoc 8 get))) (entdel ent) ) ) ) (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.