Jump to content

Leaderboard

  1. pkenewell

    pkenewell

    Community Member


    • Points

      4

    • Posts

      796


  2. yangguoshe

    yangguoshe

    New Member


    • Points

      3

    • Posts

      7


  3. eldon

    eldon

    Trusted Member


    • Points

      2

    • Posts

      4,343


  4. mhupp

    mhupp

    Trusted Member


    • Points

      1

    • Posts

      2,253


Popular Content

Showing content with the highest reputation since 06/12/2026 in Posts

  1. @masao_8 Here is a solution for a simple single selection add and SHIFT-Select to remove. Perhaps this will give you a basis for starting: ;; Function to do a simple Select/Deselect using grread. ;; By PJK - 6/16/2026 (defun pjk-grread-Select (/ done en grl grc grv ss) (if acet-load-expresstools (acet-load-expresstools)) (setq ss (ssadd)) (princ "\nSelect to add objects or SHIFT+Select to remove from selection set: ") (while (not done) (setq grl (grread T 15 2) grc (car grl) grv (cadr grl) ) (cond ((= grc 3) (if (setq en (car (nentselp grv))) (if (acet-sys-shift-down) (progn (if (ssmemb en ss)(ssdel en ss)) (redraw en 4) ) (progn (ssadd en ss) (redraw en 3) ) ) ) ) ((= grc 2) (setq done (if (vl-position grv '(13 32)) T nil)) ) ((= grc 25)(setq done T)) ) ) (if (> (sslength ss) 0) (progn (foreach i (mapcar 'cadr (ssnamex ss))(redraw i 4)) ss ) nil ) )
    3 points
  2. ;;;You can call Master Leemac's code, but do not modify it (defun c:ttt(/ CPB NEW-PT OBJ PT) (c:cb) (setq cpb (entlast)) (setq pt (cdr(assoc 10 (entget cpb)))) (setq obj (vlax-ename->vla-object cpb)) (setq new-pt (vlax-3d-point (getpoint pt "\n Specify the new location"))) (vla-move obj (vlax-3d-point pt) new-pt) (princ) )
    3 points
  3. Having a bit of spare time, I thought I would make a hatch pattern similar to the OS marsh block marsh1.pat
    2 points
  4. Perhaps you could use the undocumented (acet-sys-shift-down) express tools function within the grread loop? Then you would have to manipulate highlighting with (redraw [3/4]) and use (ssadd) and (ssdel) to update the selection set.
    1 point
  5. Isn't that how CAD works already? you select something either by mouse clicke or window it will be highlighted hold shift to deselect it the same way. I know if you have to many things selected they are no longer highlighted.
    1 point
  6. I think you would need to test for 'shift' being pressed and the test for a left mouse entity selection. Do a 'princ' on your grread loop to display what you are doing, shift and select something - which should give you what you want to test for.
    1 point
  7. Consider the following example - the selection could be automated if the target block/attribute tag is known, or alternatively, it could search every block attribute for the target field expression and perform a replacement: (defun c:test ( / e n x ) (setq n "$(substr,$(getvar,dwgname),1,3)") (while (progn (setvar 'errno 0) (setq e (car (nentsel "\nSelect field: "))) (cond ( (= 7 (getvar 'errno)) (princ "\nMissed, try again.") ) ( (null e) nil ) ( (not (wcmatch (cdr (assoc 0 (setq x (entget e)))) "TEXT,MTEXT,ATTRIB,MULTILEADER,*DIMENSION")) (princ "\nInvalid object selected.") ) ( (not (and (setq x (cdr (assoc 360 x))) (setq x (dictsearch x "ACAD_FIELD")) (setq x (dictsearch (cdr (assoc -1 x)) "TEXT")) (setq x (cdr (assoc 360 x))) (setq x (entget x)) (= "FIELD" (cdr (assoc 0 x))) (= "AcDiesel" (cdr (assoc 1 x))) ) ) (princ "\nThe selected object does not contain a DIESEL field expression.") ) ( (entmod (subst (cons 2 (strcat "\\AcDiesel " n)) (assoc 2 x) (subst (cons 1 n) (assoc 1 (member (assoc 6 x) x)) x) ) ) (command "_.regenall") ) ) ) ) (princ) )
    1 point
×
×
  • Create New...