Jump to content

Recommended Posts

Posted (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 by CADWORKER
  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • alanjt

    9

  • sadhu

    7

  • asos2000

    2

  • CADWORKER

    2

Top Posters In This Topic

Posted Images

Posted

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

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...