cat3appr Posted July 27, 2016 Share Posted July 27, 2016 Hi all, I have these drawings with numbers on the side, vertically placed. I need to reverse each one of the number , so for instance the 3.15 has to become -3.15 thanks in advance for any input! Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 27, 2016 Share Posted July 27, 2016 What sort of entities are the numbers? How were they generated? Are they externally linked? Hopefully not by the spreadsheet from Hades with 40,000+ points in your other thread. Quote Link to comment Share on other sites More sharing options...
eldon Posted July 27, 2016 Share Posted July 27, 2016 Perhaps you could use one of the lisps that operate on numbers in a drawing, and multiply your numbers by -1 Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 27, 2016 Share Posted July 27, 2016 Perhaps you could use one of the lisps that operate on numbers in a drawing, and multiply your numbers by -1 That sounds like just the ticket eldon! Quote Link to comment Share on other sites More sharing options...
cat3appr Posted July 27, 2016 Author Share Posted July 27, 2016 Perhaps you could use one of the lisps that operate on numbers in a drawing, and multiply your numbers by -1 That sounds like just the ticket eldon! So, does anyone know how to do this? Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 27, 2016 Share Posted July 27, 2016 I guess catman gave that suggestion a thumbs down. Quote Link to comment Share on other sites More sharing options...
eldon Posted July 27, 2016 Share Posted July 27, 2016 So, does anyone know how to do this? I use a lisp called TextMath, but it is quite old and there are more modern ones about. The key words to search for are "math" and "text" or variations on those words! Quote Link to comment Share on other sites More sharing options...
ReMark Posted July 27, 2016 Share Posted July 27, 2016 TextMath can be downloaded free of charge from the Cadalyst website. It dates from 2009. http://cadtips.cadalyst.com/notestex...text-and-mtext Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 27, 2016 Share Posted July 27, 2016 Assuming your text items contain only the numerical data (without surrounding text content), I would suggest using a simple prefix text program, such as this. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 28, 2016 Share Posted July 28, 2016 My $0.05 worth, should have known to go to Lee-mac first but it only took a few minutes a day ago. ; adds a suffix or prefix to text ; ; by Alan H July 2016 (defun sufftxt ( / ss obj txtstr suffix) (alert "Make sure you have only the correct text layer on\n \nPress Esc now if you need to exit\n \nUse Layiso") (if (not AH:getval2) (load "getvals")) (ah:getval2 "Enter new text" 25 24 "+ or - for prefix suffix" 3 2) (setq suffix val1) (setq ans val2) (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (setq ss (ssget)) (setq y (sslength ss)) (repeat (sslength ss) (setq obj (vlax-ename->vla-object (ssname ss (setq y (- y 1))))) (if (= (vla-get-ObjectName obj) "AcDbText") (progn (setq txtstr (vla-get-textstring obj )) (if (= ans "+") (vla-put-textstring obj (STRCAT suffix " " txtstr)) (vla-put-textstring obj (STRCAT txtstr " " suffix)) ) ;if ) ; progn ) ; if ) ; repeat (setvar "osmode" oldsnap) ) ; defun (princ ) (sufftxt) GETVALS.lsp Quote Link to comment Share on other sites More sharing options...
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.