Results 1 to 6 of 6

Thread: Add up distances

  1. #1
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Add up distances

    Is there a way to add up distances??

    I routinely have to compute the total weld length for laser welded blanks.
    It would be nice if I could just pick the points along the path the laser travels and
    AutoCad would return the total distance. This could contain several points while gathering the distances in point A to point B fashion.

    Can AutoCad currently do this somehow??

    The current distance command does not have an add/subtract feature.

  2. #2
    Certified AUGI Addict jaberwok's Avatar
    Join Date
    2000-12
    Location
    0,0,0 The Origin
    Posts
    8,570
    Login to Give a bone
    0

    Default Re: Add up distances

    I'm sure I have seen pd lisp routines to do that but, if you're picking a string of points anyway, why not pick them within the Pline command then list the pline for length? Or is it not one continuous run?

  3. #3
    Certifiable AUGI Addict dhurtubise's Avatar
    Join Date
    2005-07
    Location
    Somewhere in the BIM world
    Posts
    3,792
    Login to Give a bone
    0

    Default Re: Add up distances

    There's a Pline property call Length, you could use a pline with field in a table to do so.
    I included an example.
    Attached Files Attached Files

  4. #4
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Add up distances

    Thanks for posting the table....very handy.

    I currently draw a pline across the required points and then
    use the list command to derive the length. I then have to delete
    the pline. I am looking for a work around as sometimes my
    designers forget to delete the pline.

  5. #5
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Add up distances

    Hi rhall !

    Why are you not asking in the lisp forum ?

    Code:
    (defun c:PickDist (/ Pkt1 Pkt2 Dist )
      (setq Pkt1 (getpoint " Pick a point : " ) )
      (setq Pkt2 (getpoint Pkt1 "and pick next : " ) )
      (setq Dist 0 )
      (while Pkt2
        (princ "\n" )
        (princ (setq Dist (+ Dist (distance Pkt1 Pkt2 ))) )
        (setq Pkt1 Pkt2 )
        (setq Pkt2 (getpoint Pkt1 " next : " ) )
      )
      (princ (strcat "\nCommand: Total distance is " (rtos Dist )) )
      (princ)
    )
    : ) Happy Computing !

    kennet

  6. #6
    Certifiable AUGI Addict robert.1.hall72202's Avatar
    Join Date
    2004-07
    Location
    Detroit Michigan
    Posts
    2,508
    Login to Give a bone
    0

    Default Re: Add up distances

    sweet! That is exactly what I needed. I wasn't sure if AutoCad already had this one covered.

Similar Threads

  1. Adding Distances
    By kristy in forum AutoCAD General
    Replies: 1
    Last Post: 2009-06-16, 03:40 PM
  2. Add distances?
    By chadwickt in forum AutoCAD General
    Replies: 2
    Last Post: 2005-03-08, 06:24 PM
  3. Mutiple Extension distances
    By SkiSouth in forum Revit Architecture - Wish List
    Replies: 2
    Last Post: 2004-10-11, 02:41 PM
  4. Using the number pad to key-in distances
    By Scott D Davis in forum Revit Architecture - Tips & Tricks
    Replies: 40
    Last Post: 2004-07-04, 03:11 PM
  5. Travel Distances
    By Roger Evans in forum Revit Architecture - General
    Replies: 3
    Last Post: 2004-06-05, 03:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •