Jump to content

Feet Plus Inch Calculator


Wonder-Man

Recommended Posts

Hi All

 

I'm look for a macro or lips to create Feet-Inch calculator (specially adding feet-inch to feet-inch and other math operations). working in architectural design requires in many occasions adding and subtraction feet-inch calculations

 

Thanks

Link to comment
Share on other sites

Use the distof function to convert everything to decimal, perform the arithmetic, then use the rtos function to convert back to feet/inches.

 

Quick example:

(defun c:add ( / _getnumber tot num )

   (defun _getnumber ( msg / str num )
       (while (not (or (eq "" (setq str (getstring t msg))) (setq num (distof str))))
           (princ "\nPlease enter a number.")
       )
       num
   )

   (if (setq tot (_getnumber "\nSpecify Amount: "))
       (while (setq num (_getnumber "\nSpecify Amount to Add <Exit>: "))
           (princ (strcat "Total: " (rtos (setq tot (+ num tot)))))
       )
   )
   (princ)
)

Link to comment
Share on other sites

Enter QC in the command line to open the "Quick Calculator"

Make sure that your units are set in your drawing accordingly...

The trick for using fractional inches that I have found is to use the minus sign as a spacer between the whole inch and the fractional inch:

2 1/2" = 2-1/2"

Others have had success using a regular space, but I find using the minus sign works...

QuickCalculator.jpg

Link to comment
Share on other sites

Perhaps you can write a lisp routine and share it with us. That would be very nice of you.

 

I wish I can, I would not ask for it in the first place,

 

 

Any How thanks for the reply

 

 

Wonder-Man

Link to comment
Share on other sites

oK alanjt, let me explain exactly what I wish to find... you know some time you find a lips routine comes with a dcl file and can be a regular calculator, now instead a regular calc I like to find a calculator that do the addition and the subtraction of the feet and the inches it is similar to what post #2 shown.

 

Thanks for the reply

Link to comment
Share on other sites

Thanks for the link, Wonder-Man, I'll check it out.

I recommend the hand held Jobber 6. I still use a Jobber 5 that I bought many years ago. My first was a Jobber II.

For $70, unless you go together with some co-workers to get the $55 price, gets you an instrument you can use anywhere, anytime.

 

digger

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