Yes, here you go
(defun c:get (/ blkname dcl_id etype theList layNmList elyr
eltype eLTypeList blkName Blks tstyle styles
thkns ecolor txtht txtval ss)
(setq thelist nil)
;; load the dialog box
;; (setq dcl_id (load_dialog (strcat lispdir "get.dcl")))
(setq dcl_id (load_dialog "get.dcl")) ;;for NBBB
(if (not (new_dialog "ddget" dcl_id))
(progn
(alert "couldn't load dialog")
(exit)
);progn
);if
;;added
; (IF (= nil id:lispold)
; (setq id:lispold "x")
; (setq id:lispold id:lisp))
; (setq id:lisp "GET.lsp")
;(c:LispCounter)
;;added
(action_tile "accept"
(strcat
"(getres)"
"(done_dialog 0)"
);strcat
) ;;action_tile
(action_tile "cancel"
"(done_dialog 0)"
);action_tile
;;set values in list boxes
(setLists)
;;Now, run the dialog
(start_dialog)
(unload_dialog dcl_id)
;;Now collect the answers into a list to pass to ssget.
(if etype
(if (/="0" etype)
(progn
(setq etype (cons 0 (nth (atoi etype) etypelist)))
(if (/= "" (cdr etype))
(setq thelist (cons etype thelist))
);if
);progn
);if
);if
(if elyr
(if (/="0" elyr)
(progn
(setq elyr (cons 8 (nth (-(atoi elyr)1) laynmlst)))
(if (/= "" (cdr elyr))
(setq thelist (cons elyr thelist))
);if
);progn
);if
);if
(if eltype
(if (/="0" eltype)
(progn
(setq eltype (cons 6 (nth (atoi eltype) eltypelist)))
(if (/= "" (cdr eltype))
(setq thelist (cons eltype thelist))
);if
);progn
);if
);if
(if (/= "0" blkname)
(if (/="" blkname)
(progn
(setq blkname (cons 2 (nth (-(atoi blkname)1) Blks)))
(if (/= "" (cdr blkname))
(setq thelist (cons blkname thelist))
);if
);progn
);if
);if
(if tstyle
(if (/="0" tstyle)
(progn
(setq tstyle (cons 7 (nth (-(atoi tstyle)1) styls)))
(if (/= "" (cdr tstyle))
(setq thelist (cons tstyle thelist))
);if
);progn
);if
);if
(if (/= "" thkns)
(progn
(setq thkns (cons 39 (atof thkns)))
(setq thelist (cons thkns thelist))
);progn
);if
(if (/= "" ecolor)
(progn
(setq ecolor (cons 62 (atoi ecolor)))
(setq thelist (cons ecolor thelist))
);progn
);if
(if (/= "" txtht)
(progn
(setq txtht (cons 40 (atof txtht)))
(setq thelist (cons txtht thelist))
);progn
);if
(if (/= "" txtval)
(progn
(setq txtval (cons 1 txtval))
(setq thelist (cons txtval thelist))
);progn
);if
;;Finally, collect the selection set.
(if thelist
(progn
(if (setq ss (ssget "x" thelist))
(progn
(setq l (itoa (sslength ss)))
(princ (strcat "\n" l " entities selected."))
);progn
(progn
(Alert "No entities selected")
);progn
);if(setq ss (ssget "x" thelist))
(princ)
);progn
(Alert "No entities selected")
);if
SS
);c:get
(defun getres ()
;;get values of controls & close the dialog
(setq etype (get_tile "ddenttype"))
(setq elyr (get_tile "ddentlyr"))
(setq eltype (get_tile "ddentltype"))
(setq blkname (get_tile "ddblkname"))
(setq tstyle (get_tile "ddstyle"))
(setq ecolor (get_tile "ddentcolor"))
(setq thkns (get_tile "ddentthkns"))
(setq txtval (get_tile "ddtxtval"))
(setq txtht (get_tile "ddtxtht"))
(done_dialog 0)
);getres
(defun setLists ()
;;setup list for entity type listbox
(setq etypelist '("" "ARC" "CIRCLE" "DIMENSION" "INSERT" "LINE" "POINT" "SPLINE" "LWPOLYLINE" "TEXT"))
(start_list "ddenttype" )
(mapcar 'add_list etypelist)
(end_list)
;;setup list for layer listbox
(if (not BOGUSlay-idx) ;DUMMY TEST - USED TO PRECLUDE SEARCHING LAYER TBL EACH TIME.
(makelaylists) ; layer list - laynmlst
)
(start_list "ddentlyr")
(add_list "" )
(mapcar 'add_list laynmlst)
(end_list)
;;setup list for linetype listbox
;;do similar code to layer listbox to find layers in dwg.
(setq eltypelist '("" "CONTINUOUS" "CENTER" "CENTER2" "DASHED" "DASHED2" "HIDDEN" "HIDDEN2" "PHANTOM" "PHANTOM2"))
(start_list "ddentltype" )
(mapcar 'add_list eltypelist)
(end_list)
;;setup list for style listbox
(setq styls nil)
(setq styls (cons (cdr (assoc 2 (tblnext "style" t))) styls)) ;;rewind table on first call
(if styls
(progn
(while
(/= nil (setq styl(tblnext "style"))
(if (/= nil styl)(setq styls (cons (cdr (assoc 2 styl)) styls)))
);/=
);while
);progn
);if styls
(start_list "ddstyle")
(add_list "")
(mapcar 'add_list styls)
(end_list)
;;setup list for blockname listbox
(setq blks nil)
(setq blks (cons (cdr (assoc 2 (tblnext "BLOCK" t))) blks)) ;;rewind table on first call
(if (/= (nth 0 blks) nil)
(progn
(while
(/= nil (setq blk(tblnext "BLOCK"))
(if (/= nil blk)(setq blks (cons (cdr (assoc 2 blk)) blks)))
);/=
);while
);progn
(setq blks nil)
);if blks
(if blks
(progn
(start_list "ddblkname")
(add_list "")
(mapcar 'add_list blks)
(end_list)
);progn
);if blks
); setlists
;; This function makes a list called laynmlst which consists of all the layer
;; names in the drawing. It also creates a list called longlist which
;; consists of strings which contain the layer name, color, linetype, etc.
;; Longlist is later mapped into the layer listbox. Both are ordered the
;; same.
;;
(defun makelaylists (/ layname onoff frozth color linetype vpf vpn ss cvpname
xdlist vpldata sortlist name templist bit-70
layer_number
)
(if (= (setq tilemode (getvar "tilemode")) 0)
(progn
(setq ss (ssget "_x" (list (cons 0 "VIEWPORT")
(cons 69 (getvar "CVPORT"))
)
)
)
(setq cvpname (ssname ss 0))
(setq xdlist (assoc -3 (entget cvpname '("acad"))))
(setq vpldata (cdadr xdlist))
)
)
(setq sortlist nil)
(setq templist (tblnext "LAYER" T))
(setq layer_number 1)
(while templist
(setq name (cdr (assoc 2 templist)))
(setq sortlist (cons name sortlist))
(setq templist (tblnext "LAYER"))
;; Not dead message...
(if (= (/ layer_number 50.0) (fix (/ layer_number 50.0)))
(set_tile "error" (strcat "Collecting..." (itoa layer_number)))
)
(setq layer_number (1+ layer_number))
)
(set_tile "error" "")
(if (>= (getvar "maxsort") (length sortlist))
(progn
(if (> layer_number 50)
(set_tile "error" "Sorting...")
)
(setq sortlist (acad_strlsort sortlist))
)
(setq sortlist (reverse sortlist))
)
(set_tile "error" "")
(setq laynmlst sortlist)
(setq longlist nil)
(setq layname (car sortlist))
(setq layer_number 1)
(while layname
(if (= (/ layer_number 50.0) (fix (/ layer_number 50.0)))
(set_tile "error" (strcat "Analyzing..." (itoa layer_number)))
)
(setq layer_number (1+ layer_number))
(setq laylist (tblsearch "LAYER" layname))
(setq color (cdr (assoc 62 laylist)))
(if (minusp color)
(setq onoff ".")
(setq onoff "On")
)
; (setq color (abs color))
(setq colname (getvar "cecolor"))
(setq bit-70 (cdr (assoc 70 laylist)))
(if (= (logand bit-70 1) 1)
(setq frozth "F" fchk laylist)
(setq frozth ".")
)
(if (= (logand bit-70 2) 2)
(setq vpn "N")
(setq vpn ".")
)
(if (= (logand bit-70 4) 4)
(setq lock "L")
(setq lock ".")
)
(setq linetype (cdr (assoc 6 laylist)))
(setq layname (substr layname 1 31))
(if (= tilemode 0)
(progn
(if (member (cons 1003 layname) vpldata)
(setq vpf "C")
(setq vpf ".")
)
)
(setq vpf ".")
)
(setq ltabstr (strcat layname "\t"
onoff "\t"
frozth "\t"
lock "\t"
vpf "\t"
vpn "\t"
colname "\t"
linetype
)
)
(setq longlist (append longlist (list ltabstr)))
(setq sortlist (cdr sortlist))
(setq layname (car sortlist))
)
(set_tile "error" "")
)
(princ)
ddget : dialog {
label = "SELECT PROPERTIES TO FILTER ON";
: popup_list {
key = "ddenttype";
label = "Entity type: ";
height=1;
}//popup_list box
: popup_list {
key = "ddentlyr";
label = "Entity Layer: ";
height=1;
width=15;
}//popup_list box
: popup_list {
key = "ddentltype";
label = "Entity Linetype: ";
height=1;
}//popup_list box
: popup_list {
key = "ddblkname";
label = "Block Name: ";
height=1;
}//popup_list box
: popup_list {
key = "ddstyle";
label = "Text Style: ";
height=1;
}//popup_list box
: edit_box {
key = "ddentcolor";
label = "Entity Color: ";
height=1;
}//edit_box
: edit_box {
key = "ddentthkns";
label = "Entity Thickness: ";
height=1;
}//edit_box
: edit_box {
key = "ddtxtval";
label = "Text value: ";
height=1;
}//edit_box
: edit_box {
key = "ddtxtht";
label = "Text height: ";
height=1;
}//edit_box
ok_cancel;
} //ddget : dialog