;;=============================================================
;; Sel.lsp by Charles Alan Butler
;; Copyright 2004
;; by Precision Drafting & Design All Rights Reserved.
;; Contact CAB at TheSwamp.org
;;
;; Version 1.0 Beta July 23,2004
;; Version 1.1 Beta July 13,2005
;;
;; Creates a selection set of objects on a layer(s)
;; User picks objects to determine the layer(s)
;; Then User selects objects for ss or presses enter to
;; get all objects on the selected layer(s)
;; You may select the selection set before starting this
;; routine. Then select the layers to keep in the set
;;=============================================================
(defun c:sel
(/ ent lay ss lay:lst lay:
prompt ss:first ent:lst
)
;; An integer value that controls the visibility and highlighting of the entity.
;; The mode can be one of the following values:
;; 1 Show entity
;; 2 Hide entity (blank it out)
;; 3 Highlight entity
;; 4 Unhighlight entity
(defun ssredraw
( ss mode
/ i ename vlaobj
) )
)
)
;; get anything already selected
;; Get user selected layers
(setq lay:
prompt "\nSelect the object to choose layers to keep.") (setq lay:
prompt "\nSelect object(s) for layer filter. ENTER to continue.") )
)
;; Un HighLite the entities
(if (> (length lay:lst
) 0); got layers to work with (setq lay:lst
(vl-sort lay:lst '
<)) ; removes douplicates (foreach itm lay:lst
; combine lay names into one , del string (if ss:first
; ALREADY GOT SELECTION SET )
)
(progn ; else get a selection set to work with (prompt (strcat "\nOK >>--> Select objects for Selection set or " "ENTER for All objects on layer(s) " lay))
;; get objects using filter with user select
;; or get ALL objects in current space using filter
)
)
)
" Object(s) selected on layer(s) " lay
"\nStart an ACAD command, REGEN to un highlite."))
)
(prompt "\n*** Nothing Selected ***") )
)
)
)
(prompt "\nSelect on Layer loaded, Enter Sel to run.")