CADWORKER Posted October 25, 2022 Posted October 25, 2022 (edited) On 10/20/2022 at 5:44 AM, BIGAL said: Post a dwg not sure what your after. Dear BIGAL, Attached drawing for reference. TEST-SPOT-01.dwg Edited October 25, 2022 by CADWORKER Quote
BIGAL Posted October 25, 2022 Posted October 25, 2022 Try this ; Adds a fixed amount to a number (Alert "TO USE JUST TYPE A2L or A2LM for multiple ") ;(setvar "cmdecho" 1) (setq olddimzin (getvar "Dimzin")) (setvar "dimzin" 0) (DEFUN c:A2L ( / test en1 v1 a b el en1) (setq v2 (getreal "\nEnter amount")) (setq test 1) (while (= test 1) (setq en1 (car (entsel "\nSelect text number:" ))) (if (/= en1 nil) (progn (setq el1 (entget en1)) (setq v1 (atof (cdr (assoc 1 el1)))) (setq a (+ v1 v2)) (setq b (rtos a 2 0)) (setq el (subst (cons 1 b) (assoc 1 el1) el1)) (entmod el) ; (entupd en1) );progn (princ "\nplease pick again"); else );if ); while true (setq el nil) (setq en nil) (setq a nil) (setq v1 nil) (setvar "cmdecho" 1) (setvar "dimzin" olddimzin) (princ) ); END a2l DEFUN (defun c:A2LM () (if (not AH:getvalsm)(load "Multi Getvals")) (setq v2 (getreal "\nEnter amount")) (setq ss (ssget (list (cons 0 "Text")))) (setq len (sslength ss)) (setq x 0) (repeat len (setq en1 (ssname ss x)) (setq el1 (entget en1)) (setq v1 (atof (cdr (assoc 1 el1)))) (setq a (+ v1 v2)) (setq b (rtos a 2 0)) (setq el (subst (cons 1 b) (assoc 1 el1) el1)) (entmod el) (setq x (+ x 1)) ); repeat (setq el nil ss nil) (setq en nil) (setq a nil) (setq v1 nil) (setvar "dimzin" olddimzin) (setvar "cmdecho" 1) (princ) ); END a2lm DEFUN 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.