Hudson Posted August 25, 2009 Posted August 25, 2009 Is the most efficient to do this to test every point on the arc in a loop? Or is there a better way? Thanks for any and all input Andrew Quote
Hudson Posted August 25, 2009 Author Posted August 25, 2009 Look into vlax-curve-getClosestPointto Thanks! I figured making a brute force loop wouldn't be the best way Quote
Lee Mac Posted August 25, 2009 Posted August 25, 2009 As an example: (defun c:test (/ pt ent cLs) (vl-load-com) (if (and (setq ent (car (entsel "\nSelect an Object: "))) (setq pt (getpoint "\nSelect a Point to Test: "))) (progn (setq cLs (vlax-curve-getClosestPointto ent pt)) ;; -- Display Point -- (setvar "PDMODE" 34) (vla-addPoint (vla-get-ModelSpace (vla-get-ActiveDocument (vlax-get-acad-object))) (vlax-3D-point cLs)))) (princ)) Quote
khoshravan Posted December 19, 2011 Posted December 19, 2011 Look into vlax-curve-getClosestPointto What is VLAX? Is this a Cad command name? Quote
BlackBox Posted December 19, 2011 Posted December 19, 2011 If memory serves VLAX specifies a Visual LISP ActiveX function prefix. ... It (my memory) didn't. See next post. ** Edit - Just wanted to get my guess in before Lee's (correct) answer. LoL Quote
BlackBox Posted December 19, 2011 Posted December 19, 2011 Aha... Found it! Lee's post here clarifies the different function prefixes that Visual LISP uses. Quote
khoshravan Posted December 20, 2011 Posted December 20, 2011 Aha... Found it! Lee's post here clarifies the different function prefixes that Visual LISP uses. Thanks. They are far beyond my knowledge and I don't think I can use them. Quote
BlackBox Posted December 20, 2011 Posted December 20, 2011 Thanks. They are far beyond my knowledge and I don't think I can use them. Not at all... It may just take some time to understand how they work, and how to properly use them. Have you tried Lee's code in post #4? Quote
Lee Mac Posted December 20, 2011 Posted December 20, 2011 Have you tried Lee's code in post #4? at my old coding style... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.