Jump to content

change number


issammesk

Recommended Posts

hi sir

please sir i have alot of profiles and i want chane numbers by x 100

can i have lsp to select number and outmaticly x 100

example 0.00100 i wanted 0.100

CI_SD_153_15_04_001-Model.jpg

Edited by issammesk
many profiles
Link to comment
Share on other sites

Try this issammesk and let me know . :)

 

(defun c:Test (/ sel doc)
 ;;	Tharwat . Date: 14.Sep.2014	;;
 (if (setq sel (ssget "_:L" '((0 . "TEXT,MTEXT")(1 . "*#*"))))
   (progn
     (vla-startundomark (setq doc (vla-get-activedocument (vlax-get-acad-object))))
     ((lambda (i / sn st e)
        (while (setq sn (ssname sel (setq i (1+ i))))
          (if (numberp (read (setq st (cdr (assoc 1 (setq e (entget sn)))))))
            (entmod (subst (cons 1 (rtos (* (atof st) 100.) 2 3))
                           (assoc 1 e)
                           e
                    )
            ) ) ) ) -1 )
     (vla-endundomark doc)
   )
 )
 (princ)
)(vl-load-com)

Link to comment
Share on other sites

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...