Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/28/2026 in all areas

  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 ) )
    1 point
  2. 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
  3. Doesn't that depend on PICKADD value? I do believe the default is select to add and shift select to deselect from selection set. To that end, it needs to be clarified from OP what they need, my WAG is something being already done with grread and need to deselect. AFAIK (and that's very little, mostly from my previous thread ) The left click is doable with grread, but it would ignore the SHIFT (also CTRL, etc.), so probably would need something else to show the SHIFT key is pressed. Which reminds me I need to get back to work on that and the centerline on rivers, roads, etc. problem when I get regular work caught up.
    1 point
  4. 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
  5. 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
×
×
  • Create New...