Distance command

Discussion in 'AutoCAD' started by David Allen, Apr 8, 2005.

  1. David Allen

    David Allen Guest

    I need a distance Nearist to Perpendicular that will disregard Z elevations
    and will display its results in both Architectural and decimal format.
    Distance = 30'-0"
    Distance = 360.00001234


    David
     
    David Allen, Apr 8, 2005
    #1
  2. David Allen

    Tim Decker Guest

    I have had this one for a while, try it out. Precision is based on the
    settings below, with istructions on how to change.

    (defun c:2d (/ pt1 pt2)
    (setvar "cmdecho" 0)
    (setq pt1 (getpoint "\nFirst Point: "))
    (setq pt2 (getpoint pt1 "\nSecond Point: "))
    (command ".dist" ".z" "0,0,0" pt1 ".z" "0,0,0" pt2)
    (princ (strcat "\nDistance = " (rtos (getvar "distance") 4 0)))
    ;Change the zero to change precision
    (princ (strcat "\nDistance = " (rtos (getvar "distance") 2 8)))
    ;Change the eight to change precision
    (prin1)
    )
     
    Tim Decker, Apr 8, 2005
    #2
  3. David Allen

    Medeziner Guest

    Medeziner, Jun 26, 2005
    #3
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.