CAD USER Posted November 18, 2015 Posted November 18, 2015 Hi everyone, anybody has lips for text multiply? If someone has, please attach. Thanks in advance.... Quote
rlx Posted November 18, 2015 Posted November 18, 2015 multiply text... mmm , copy command? Multiply how? Just maybe I have a routine thats does what you want : http://www.cadtutor.net/forum/showthread.php?93900-VT-atrribute-amp-text-editor-RLX Once up and running you can click on a text and then you can use the copy option to copy the string to other text's or attributes. Even if the attributes in a block are empty you can still copy the string to them. gr. Rlx Quote
CAD USER Posted November 18, 2015 Author Posted November 18, 2015 DEAR RLX, I DOWNLOAD LISP FROM GIVEN LINK, BUT IT'S GIVING ERROR MESSAGE, ; error: bad character read (octal): 1 Quote
rlx Posted November 18, 2015 Posted November 18, 2015 DEAR RLX, I DOWNLOAD LISP FROM GIVEN LINK, BUT IT'S GIVING ERROR MESSAGE, ; error: bad character read (octal): 1 Never heard that one before? Did you rename vt.lsp to vt.vlx and then load it with (load "vt.vlx") ? Or was the download itself corrupted? I also posted the souce (lsp and dcl) in a separate thread so you can try that one too but I thought it would be better to have one file (dcl and lsp in one). gr. Rlx Quote
CAD USER Posted November 18, 2015 Author Posted November 18, 2015 Yes, i rename it, it's work great... Thanks, rlx... Thanks for sharing such a good thing..... Quote
rlx Posted November 18, 2015 Posted November 18, 2015 Yes, i rename it, it's work great...Thanks, rlx... Thanks for sharing such a good thing..... You're welcome , isn't that the meaning of life... sharing :-) gr. Rlx Quote
CAD USER Posted November 18, 2015 Author Posted November 18, 2015 Dear rlx, it's not exactly the same which is i am looking for... Quote
CAD USER Posted November 18, 2015 Author Posted November 18, 2015 Please try to provide me simple lisp routine... Quote
rlx Posted November 18, 2015 Posted November 18, 2015 Please try to provide me simple lisp routine... well in that case you will have to be a little bit more specific in what you are looking 4 , what exactly do you mean by multiply text? Have you ever looked at the site from Lee Mac? He has lots of examples of little and big programs , maybe what you seek is allready there. gr. Rlx Quote
CAD USER Posted November 18, 2015 Author Posted November 18, 2015 Dear rlx, i attached sum lisp, i m looking for same lisp as this lisp for multiply Quote
ReMark Posted November 18, 2015 Posted November 18, 2015 MathText.lsp Find it here.....http://cadtips.cadalyst.com/notestext/run-calculations-numerical-text-and-mtext You need to brush up on your search skills. Quote
rlx Posted November 18, 2015 Posted November 18, 2015 No problem , save your routine as sum2 or something and make the following changes : on line 10 change (setq sum 0.) to (setq sum 1) and in line 27 change the + sign in * , et voila... gr.Rlx Quote
CAD USER Posted November 19, 2015 Author Posted November 19, 2015 anybody can help me please... Quote
BIGAL Posted November 19, 2015 Posted November 19, 2015 Post a image or a dwg exactly what you want Quote
Manila Wolf Posted November 19, 2015 Posted November 19, 2015 This excellent lisp by "alanjt" maybe what you are looking for: - http://www.cadtutor.net/forum/showthread.php?46688-Combinevalues.LSP-Add-Divide-Multiply-Subtract-object-values& Quote
rlx Posted November 19, 2015 Posted November 19, 2015 anybody can help me please... (defun C:STM (/ cpent elist en ip newtxt pt ss sum sumtxt txt) (princ "\n\t\t>>> Select text to get summ >>>") (if ;;select texts/mtexts on screen : (setq ss (ssget '((0 . "*TEXT")))) ;; if selected then : (progn ;; store the first text entity for using 'em further : (setq cpent (ssname ss 0)) ;; set initial sum to zero : (setq sum 1) ;; loop trough selected texts/mtexts : (while ;; get the first text in selection : (setq en (ssname ss 0)) ;; get entity list of them : (setq elist (entget en)) ;; get the textstring by key 1 from entity list : (setq txt (cdr (assoc 1 elist))) ;; create output string : (setq sumtxt ;; concatenate strings : (strcat ;; convert digits to string : (rtos ;; add to summ the digital value of text : (setq sum (* (atof txt) sum)) ;; 2 is for metric units (3 for engineering) : 2 ;; set precision by current : (getvar "dimdec"))) ) ;; delete entity from selection set : (ssdel en ss) ) ;; display message in the command line: (princ (strcat "\nSumm=" sumtxt)) (setq pt (getpoint "\nSpecify the new text location: ")) ;; get the insertion point of stored entity : (setq ip (cdr (assoc 10 (entget cpent)))) ;; copy text entity to the new destination point : (command "_copy" cpent "" ip pt) ;; get the last created entity : (setq newtxt (entlast)) ;; get entity list of them : (setq elist (entget newtxt)) ;; modify entity list with new text string : (entmod (subst (cons 1 sumtxt)(assoc 1 elist) elist)) ;; update changes : (entupd newtxt) ) ) (princ) ) (princ "\nStart command with STM") (princ) 1 Quote
ReMark Posted November 19, 2015 Posted November 19, 2015 anybody can help me please... MathText.lsp Quote
CAD USER Posted November 27, 2015 Author Posted November 27, 2015 (defun C:STM (/ cpent elist en ip newtxt pt ss sum sumtxt txt) (princ "\n\t\t>>> Select text to get summ >>>") (if ;;select texts/mtexts on screen : (setq ss (ssget '((0 . "*TEXT")))) ;; if selected then : (progn ;; store the first text entity for using 'em further : (setq cpent (ssname ss 0)) ;; set initial sum to zero : (setq sum 1) ;; loop trough selected texts/mtexts : (while ;; get the first text in selection : (setq en (ssname ss 0)) ;; get entity list of them : (setq elist (entget en)) ;; get the textstring by key 1 from entity list : (setq txt (cdr (assoc 1 elist))) ;; create output string : (setq sumtxt ;; concatenate strings : (strcat ;; convert digits to string : (rtos ;; add to summ the digital value of text : (setq sum (* (atof txt) sum)) ;; 2 is for metric units (3 for engineering) : 2 ;; set precision by current : (getvar "dimdec"))) ) ;; delete entity from selection set : (ssdel en ss) ) ;; display message in the command line: (princ (strcat "\nSumm=" sumtxt)) (setq pt (getpoint "\nSpecify the new text location: ")) ;; get the insertion point of stored entity : (setq ip (cdr (assoc 10 (entget cpent)))) ;; copy text entity to the new destination point : (command "_copy" cpent "" ip pt) ;; get the last created entity : (setq newtxt (entlast)) ;; get entity list of them : (setq elist (entget newtxt)) ;; modify entity list with new text string : (entmod (subst (cons 1 sumtxt)(assoc 1 elist) elist)) ;; update changes : (entupd newtxt) ) ) (princ) ) (princ "\nStart command with STM") (princ) Dear rlx , THANKS THIS LISP EXACTLY THE SAME, IT'S PERFECT LISP THANKS ONCE AGAIN.... Quote
CAD USER Posted November 27, 2015 Author Posted November 27, 2015 MathText.lsp Thnaks Dear ReMark, thanks that u attend my question.... Quote
rlx Posted November 27, 2015 Posted November 27, 2015 Dear rlx , THANKS THIS LISP EXACTLY THE SAME, IT'S PERFECT LISP THANKS ONCE AGAIN.... Glad 2b able 2 help :-) Actualy like this function , thinking bout building it in my VT app. Gr. Rlx 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.