(if (= EnTyp "LWPOLYLINE") (vla-delete o)Īnd then, just convert to polyline and join it as much as possible. (defun c:AddArcTangents (/ _angle _line e ep p sp tmp objlay) (princ (strcat "\n" (itoa (sslength ss1)) " Line Converted. (princ (strcat "\n" (itoa (sslength ss1)) " Lines Converted. (setq varlist (list "cmdecho" "peditaccept") leave exploded line. instead of original one. delete ssget :S option for multi selection, add :L for except locked layer.ģ.
Thanks edit little bit of that code for my works.ġ. (Prompt "\nNo Arcs or Polylines Selected") (if (= EnTyp "LWPOLYLINE") (vla-delete o)) (if (and (setq e (car (entsel))) (setq tmp (vlax-invoke (vlax-ename->vla-object e) 'explode))) (foreach tmp (vl-remove-if 'listp (mapcar 'cadr (ssnamex SS))) (if (and (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-curve-getendparam (list ename)))) (defun _angle (ename pt / ang clpt e param)
Well you didn't save it then need to update to this. Then modified it to work with preselected objects as well including arcs & lwpolylines. I've collected a lot of code and snippets from him over the years. (if (= EnTyp "LWPOLYLINE")(vla-delete o)) (setq p (inters sp (polar sp (_angle o sp) 1) ep (polar ep (_angle o ep) 1) nil)) (progn (setq sp (vlax-curve-getstartpoint o)) (setq tmp (list (vlax-ename->vla-object e))) (setq tmp (vlax-invoke (vlax-ename->vla-object e) 'explode)) (setq ang (angle '(0 0) (vlax-curve-getfirstderiv ename param))) (setq param (vlax-curve-getparamatpoint ename clpt)) (setq clpt (vlax-curve-getclosestpointto ename pt))
(defun c:AddArcTangents (/ _angle _line e ep p sp tmp) ^P(or C:AddArcTangents (load "AddArcTangents.lsp")) AddArcTangents
(load "AddArcTangents.lsp") AddArcTangents modified it to work with preselected objects as well including arcs & lwpolylines - by Tom Beauford Named "Add Arc Tangents" with description "Add Tangent Lines to arc sections." to my "LWPline Object Menu" so I can add them simply by right-clicking on a lwpolyline and picking "Add Arc Tangents". ^P(or C:AddArcTangents (load "AddArcTangents.lsp")) AddArcTangents i drew a road centerline in autocad and i divided it at 1 m interval, i want to add numbers to the points and export their coordinates orderly to excel. I renamed the command as AddArcTangents and saved it as AddArcTangents.lsp then modified it to work with preselected objects as well including arcs & lwpolylines. This lisp by ronjonp should do the trick: