Jump to content

Leaderboard

Popular Content

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

  1. Here's another way without iterating the tabs .. assumes that the viewport is in the EXACT same spot. (defun c:foo (/ e p s) ;; RJP » 2020-05-08 (if (and (setq e (car (entsel "\nPick viewport to delete: "))) (setq p (vl-remove-if-not '(lambda (x) (member (car x) '(0 10 40 41))) (entget e))) (setq s (ssget "_X" p)) ) (foreach vp (mapcar 'cadr (ssnamex s)) (vl-catch-all-apply 'vla-delete (list (vlax-ename->vla-object vp))) ) ) (princ) )
    1 point
  2. Not sure how you will implement it, but I think you'll have to use grread (defun rh:get_keypress (keys / key asc c flg) (while (null flg) (setq key (grread)) (cond ( (= 13 (cadr key)) (setq flg T)) ( (= (car key) 2) (setq asc (cadr key) c (chr asc) flg (member asc (vl-string->list keys)))) ) ) c ) pass in keys, which is a string, so if you want to capture the + key (rh:get_keypress "+") they only problem is that it will wait for a key press.
    1 point
  3. Thx in advance. I have gotten the idea.
    1 point
  4. If you are in the third layout then the selection set contains entities only in that layout. Similar entities in the same location in other layouts will not be selected. You must make a selection set in each layout. (setq p1 (getpoint "\np1: ")) (setq p2 (getpoint "\np2: ")) (foreach lout (layoutlist) (setq seleksi nil) (setq seleksi (ssget "C" p1 p2)) (command "erase" seleksi "") (command "rectangle" p1 p2 "") )
    1 point
×
×
  • Create New...