Waste/Percentage lisp routine

Discussion in 'AutoCAD' started by Viking, Apr 14, 2004.

  1. Viking

    Viking Guest

    Greetings,
    I am new to lisp routines and I am trying to find out if there is anything out there that will apply a wastage percentage of thickness of materials. What I am looking for is... a prompt to ask for a thickness of material and another to ask for the thickness of the material so it could output the wasted percentage, i.e.,
    "Enter thickness of material".... .30"
    "Enter gauged thickness of material".... .25"
    then the output would look something like this......
    0.25"
    (83%)


    Thanks
     
    Viking, Apr 14, 2004
    #1
  2. Viking

    Paul Turvill Guest

    That's a pretty simple routine to write: get the two variables, divide one
    by the other, multiply by 100 and display the result. Why not try your hand
    at writing a routine, then post your efforts for critique?
    ___
     
    Paul Turvill, Apr 14, 2004
    #2
  3. Viking

    Paul Turvill Guest

    BTW, the way I read your post, the 83% would be the material *utilization*
    rather than the waste.
    ___
     
    Paul Turvill, Apr 14, 2004
    #3
  4. Viking

    bob.at Guest

    Hello Viking,

    something like this:

    (strcat (rtos (* (/ 1 (/ (getreal "Thickness: ") (getreal "Gauged thickness: "))) 100.0) 2 0) "%")
     
    bob.at, Apr 14, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.