Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Distance between 2 circles on arc

3 REPLIES 3
Reply
Message 1 of 4
harrison071004
2006 Views, 3 Replies

Distance between 2 circles on arc

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
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: harrison071004

Those are points on the arc, not circles.

This will create a dimarc which measures the distance and annotates it.

(prompt "\nSelect the arc, points on the arc, and then dimension line location.")
(command "dimarc" "nea" pause "partial" "nod" pause "nod" pause)

You could also create a program that utilizes the functions:

entsel
vlax-ename->vla-object
vlax-curve-getparamatpoint
vlax-curve-getdistatparam



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
Message 3 of 4

Yes, sorry your right they are points not circles.
That sounds what I need exactly, BUT I'm not sure what you provided me..was that a lisp routine? If so would you be able to send me the actual file I have no clue how to "type" a lisp routine. Thanks in advance!
Message 4 of 4
Anonymous
in reply to: harrison071004

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost