Jump to content
BrianTFC

Multipling quantity x feet and inches

Recommended Posts

BrianTFC

Hi All

 

What i'm looking to do is the following with a lisp routine.

 

pick 1st pick 2nd place answer

(10) 5'-0" = 50'

 

Thanks,

Brian

Share this post


Link to post
Share on other sites
Lee Mac

Try this old program: Text Calculator

 

[ Desperately needs updating ]

Share this post


Link to post
Share on other sites
BrianTFC

Lee,

 

I was thinking of something a little more simple like this lisp that Jeff Sanders wrote.

 

(defun C:MP()
 (setvar "cmdecho" 0)
 (while(setq pickF(entsel "\nFirst Item: "))
   (setq pickS(entsel "\nSecond Item: "))
   (if(and pickF pickS)
     (progn
       (setq valF(distof(cdr(assoc 1 (entget (car pickF))))))
       (setq valS(distof(cdr(assoc 1 (entget (car pickS))))))
       (setq valN(rtos(* valF valS)))
       (setq txHt(cdr(assoc 40 (entget (car pickF)))))
       (setq rtAn(cdr(assoc 50 (entget (car pickS)))))
       (command "text" (getpoint "\nInsertion Pt:") txHt (angtos rtAn) valN)
     )
   )
 )
 (princ)
)

 

Thanks Lee for your help.

Brian

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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