Results 1 to 2 of 2

Thread: DIM Pline by total length?

  1. #1
    Certifiable AUGI Addict cadtag's Avatar
    Join Date
    Cairo - no, not Illinois
    Login to Give a bone

    Default DIM Pline by total length?

    I need to apply dimensions to arbitrary pline segments for total length -- segments may include curves, reverse curves, straight line segments, etc in any combination. Total length I can get with a field, but any one have something simple to automate getting that length and adding arrowheads? preferably looking at the current DIMSTYLE for arrowhead, textstyle, and dimscale?

    Basically i want this to look as much as possible like the remainder of the dimensions in the sheet.

  2. #2
    Join Date
    Login to Give a bone

    Default Re: DIM Pline by total length?

    I have what may be the exact same problem. I my case, these are pipe runs that I want to call-out the length of the polyline. I found this thread on AUGI,
    It has this LISP code,

    (defun C:GetLength (/ intCount entItem sngLength objItem)
    (setq ssSelections
    (ssget (list (cons 0 "*LINE,ARC")))
    sngLength 0
    (repeat (setq intCount (sslength ssSelections))
    (setq intCount (1- intCount)
    entItem (ssname ssSelections intCount)
    objItem (vlax-ename->vla-object entItem)
    sngLength (+ sngLength
    (vlax-curve-getEndParam objItem)
    (if (zerop (cdr (assoc 40 (entget (tblobjname "style" (getvar
    (vl-cmdf ".text" (getpoint "\nPick point for text ") (getvar
    "textsize") 0.0 sngLength)
    (vl-cmdf ".text" (getpoint "\nPick point for text ") 0.0

    However, the text it inserts is not associative. I think I would prefer text that inserts a field with the polyline length, and I don't now how to do that. But, even a field in a MTEXT object will not automatically update unless you regenerate the drawing. So, I don't know of an ideal solution.
    Also, note that while AutoCAD now can report the length and area as a property of a polyline for programs to use, I don't recall what year that was added.


Similar Threads

  1. Total Pline Length Tracked in Dwg with Fields?
    By dwknutson in forum AutoLISP
    Replies: 5
    Last Post: 2017-10-10, 01:48 PM
  2. Replies: 9
    Last Post: 2015-05-03, 07:12 PM
  3. add and total lines/pline
    By CADiver in forum AutoLISP
    Replies: 10
    Last Post: 2012-01-18, 07:07 PM
  4. Multiple Pline selection area total
    By aaronlogan in forum AutoCAD General
    Replies: 6
    Last Post: 2006-07-13, 06:14 PM
  5. Replies: 2
    Last Post: 2005-01-03, 02:57 PM

Posting Permissions

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