Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/2023 in all areas

  1. I tried that but still slow. This is in a drawing that has 18k objects. This seems to do the business, it's more or less instant. Not sure why it says "*Invalid selection*" in the command line though.... (defun c:QSLAYERS_SELECTED_QUICK (/ *error* var_cmdecho var_osmode var_selectsimilarmode ss1) (defun *error* (errmsg) (and acDoc (vla-EndUndoMark acDoc)) (and errmsg (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*")) (princ (strcat "\n<< Error: " errmsg " >>\n")) ) (setvar 'cmdecho var_cmdecho) (setvar 'osmode var_osmode) (setvar 'selectsimilarmode var_selectsimilarmode) ) (setq acDoc (vla-get-ActiveDocument (vlax-get-acad-object))) (or (vla-EndUndoMark acDoc) (vla-StartUndoMark acDoc)) (setq var_cmdecho (getvar 'cmdecho)) (setq var_osmode (getvar 'osmode)) (setq var_selectsimilarmode (getvar 'selectsimilarmode)) (setvar 'cmdecho 0) (setvar 'osmode 0) (setvar 'selectsimilarmode 2) ; Select by layer (princ "Filter select all on selected object/s Layer/s :\n") (setq ss1 (cond ((ssget "_I")) ; preselection, if any ((vl-cmdf "_.selectsimilar" pause)) ; User selection if no pre-selection ) ) (if ss1 (vl-cmdf "_.selectsimilar" "")) ;; If the ss1 variable is a selection set (*error* nil) (princ) ) ; (c:QSLAYERS_SELECTED_QUICK)
    1 point
  2. (setq el (entlast)) (setq ss (ssadd)) ... DO PICKING WITH BPOLY ... FINISHED... (exit while loop) (while (setq el (entnext el)) (ssadd el ss) ) (sssetfirst nil ss) ;;; your selection set with newly created polylines/regions highlighted...
    1 point
  3. You can grab most commands from another tab and put in a custom menu so no jumping tabs or changing workspace did this for CIV3D, had a few most used in my drafting workspace. Using ribbon a bit more complicated than toolbars or pop menu's.
    1 point
×
×
  • Create New...