Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/03/2020 in all areas

  1. https://knowledge.autodesk.com/support/autocad-lt/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/AutoCAD-LT/files/GUID-8675B657-8C15-4594-BDFB-644B66BD02D7-htm.html
    1 point
  2. Try the attached SLOT.PAT file, fresh off the farm. Slot.pat
    1 point
  3. Still looking pretty sure does what you want. Some code I lost when changed to retired. Pretty sure was here. This is lots to table. Table of lots.lsp
    1 point
  4. There was a similar topic that Steal text inside polyline. Not really much tweaking, but here: (defun c:polypoint ( / *error* acadobj activeundo adoc catch insidepoly msp osm pls pt ray) (defun *error* ( msg ) (setvar 'osmode osm) (if (and (eq (type ray) 'vla-object) (null (vlax-erased-p ray))) (vl-catch-all-apply 'vla-delete (list ray))) (vla-EndUndoMark adoc) (if (not (wcmatch (strcase msg T) "*break*,*cancel*,*exit*")) (princ (strcat "Error: " msg)) ) ) (defun insidepoly (pt ent ray / ints) (setq ints (vlax-invoke (vlax-ename->vla-object ent) 'intersectwith ray acExtendNone)) (if (eq (rem (length ints) 6) 3) ent) ) (setq acadobj (vlax-get-acad-object) adoc (vla-get-ActiveDocument acadobj) msp (vla-get-ModelSpace adoc) activeundo nil) (if (= 0 (logand 8 (getvar "UNDOCTL"))) (vla-StartUndoMark adoc) (setq activeundo T)) (setq osm (getvar 'osmode)) (setvar 'osmode 0) (setq pt (progn (initget 1) (getpoint "\nSpecify point: ")) ray (vla-AddRay msp (vlax-3d-point pt) (vlax-3d-point (polar pt 0 1))) pls (ssget "_X" '((0 . "LWPOLYLINE") (70 . 1))) ) (if (setq catch (vl-some '(lambda (x) (insidepoly pt x ray) ) (JH:selset-to-list pls) ) ) (sssetfirst nil (ssadd catch)) ) (vla-delete ray) (setvar 'osmode osm) (if activeundo nil (vla-EndUndoMark adoc)) (princ) ) (defun JH:selset-to-list (selset / lst iter) ; Returns all entities within a selection set into a list. (if selset (repeat (setq iter (sslength selset)) (setq lst (cons (ssname selset (setq iter (1- iter))) lst)) ) ) )
    1 point
×
×
  • Create New...