Author Topic: SELECTRUN Multiple LSP  (Read 1055 times)

0 Members and 1 Guest are viewing this topic.

Offline AN-detailTopic starter

  • Active Member
  • **
  • Posts: 18
  • Country: us
  • Gender: Male
SELECTRUN Multiple LSP
« on: Jul 25, 2025, 15:45:46 PM »
I thought I'd share a version of the SELECTRUN command that allows you to select multiple runs. SELECTRUN doesn't like selection sets, so I had to work around that. Enjoy.

Code: [Select]
;;SELECT RUN MULTIPLE
(defun C:SRR  ( / ssAll ssTemp)
(princ "\n*** SELECT RUN ***\n")
(COMMAND "SELECTRUN" pause)
(setq ssAll (ssget "_I"))
(if ssAll
(progn
   (sssetfirst nil ssAll)
   (setq continue 1)
   (while (= continue 1)
    (princ "\n*** SELECT NEXT RUN OR PRESS ENTER ***\n")
    (COMMAND "SELECTRUN" pause)
    (setq ssTemp (ssget "_I"))
    (if ssTemp
      (progn
(COMMAND "SELECT" ssAll ssTemp "")
(setq ssAll (ssget "_P"))
(setq ssTemp nil)
(sssetfirst nil ssAll))
      (setq continue 0)
    )
   )
   (COMMAND "SELECT" ssAll "") ;Shows count in console
   (sssetfirst nil ssAll)
   (COMMAND "REGEN") ;Fixes selection not highlighted in model
   (COMMAND)     ;Clean command line
)
)
(princ)
)