flopo Posted November 26, 2009 Posted November 26, 2009 Hello everybody, somebody made a lisp to insert a block along a polyline and to indicate the lenght of the poly from the end to that point of insertion. The problem is that this lisp does not select the nearest point along the poly to insert the block. to indicate the lenght, the block has an attribute. Can anybody modify the lisp to select the nearest point on polyline when i insert the block? Thanks! node.lsp Quote
lpseifert Posted November 26, 2009 Posted November 26, 2009 a quick edit of your code (defun C:NODE (/ pick space inc); for Mark PolyLine with Distance (setvar 'attdia 0) (setq pick (entsel "\nSelect Polyline at marker location:") picknear (osnap (cadr pick) "nea") pickname (car pick) pton (vlax-curve-getClosestPointTo pickname picknear) ); end setq (command "_.insert" "kilo10" pton "" "" "" ; scale factors [1] and rotation [0] (rtos ; answer to attribute value prompt (vlax-curve-getDistAtPoint pickname pton); end getDist ); end rtos ); end command ); end defun 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.