Put this in a text file and save it with a .LSP
extension, somewhere in your AutoCAD search
path:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; brklen.lsp (c) 2002 www.caddzone.com
;;;; Adds the BRKLEN command to AutoCAD, that
;;;; displays the length of the segment of a curve
;;;; between two break points. the curve can be a
;;;; spline, polyline, arc, circle, line, ellipse, etc..)
;;;;
;;;; First pick the curve, then pick the two points
;;;; on the curve that you want to measure between.
;;;;
;;;; Standard caveat: minimal error checking done.
(defun C:BRKLEN (/ p1 p2 ent curve pc1 pc2 result )
(if
(and
(setq ent (entsel "\nCurve to measure along: "))
(setq p1 (getpoint "\nMeasure from point: "))
(setq p2 (getpoint " To point: "))
(setq curve (car ent))
)
(vl-catch-all-apply
'(lambda ()
(setq pc1 (vlax-curve-getclosestpointto curve p1))
(setq pc2 (vlax-curve-getclosestpointto curve p2))
(setq result
(abs
(- (vlax-curve-getdistatpoint curve pc1)
(vlax-curve-getdistatpoint curve pc2)
)
)
)
)
)
)
(if result
(princ (strcat "\nLength: " (rtos result)))
(princ "\nError or invalid selection.")
)
(princ)
)
;;;;;;;;;;;;;;;;;;;;;;; brklen.lsp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com
wrote in message news:5827455@discussion.autodesk.com...
Hello. I'm trying to figure out a way to get a distance between two circles on a arc. I won't be able to do the distance command b/c that is not accurate b/c of the arc. If I trim the lines outside the circles I end up with 21 feet but I don't want to have do that...please see attached