Jump to content

Recommended Posts

Posted

Hi everyone,

 

anybody has lips for text multiply?

 

If someone has, please attach.

 

Thanks in advance....

Posted

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

Posted

DEAR RLX,

 

I DOWNLOAD LISP FROM GIVEN LINK, BUT IT'S GIVING ERROR MESSAGE,

; error: bad character

read (octal): 1

Posted
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

Posted

Yes, i rename it, it's work great...

Thanks, rlx...

Thanks for sharing such a good thing.....

Posted
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

Posted

Dear rlx,

it's not exactly the same which is i am looking for...

Posted

Please try to provide me simple lisp routine...

Posted
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

Posted

Dear rlx,

 

i attached sum lisp, i m looking for same lisp as this lisp for multiply

Posted

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.

Posted

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

Posted
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)


  • Like 1
Posted
anybody can help me please...

 

MathText.lsp

Posted


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

Posted
MathText.lsp

 

Thnaks Dear ReMark,

thanks that u attend my question....

Posted
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

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