forked from jdsandifer/AutoLISP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INPUT.LSP
executable file
·65 lines (52 loc) · 2.18 KB
/
INPUT.LSP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
;;;;;;;[ Helper Functions - User Input ];;;;;;;;
;; ;;
;; Shared helper functions for user input. ;;
;; ;;
;;::::::::::::::::::::::::::::::::::::::::::::::;;
;; ;;
;; Author: J.D. Sandifer (Copyright 2016) ;;
;; Written: 04/06/2016 ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; 04/13/2016 ;;
;; - Added LM:ssget and endfile. ;;
;; - Shortened file name to INPUT. ;;
;; ;;
;; 04/06/2016 ;;
;; - File creation. ;;
;; - Added Input-SelectionSet(). ;;
;; ;;
;; Todo: ;;
;; - Refactor out more functions. ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SelectionSet - Has the user select objects and applies the
;; provided filter to the selection.
;; Returns the selection set.
(defun JD:InputSelectionSet ( varToSet filterList )
(set varToSet (ssget filterList)))
;; ssget - Lee Mac
;; A wrapper for the ssget function to permit the use of a custom selection prompt
;; msg - [str] selection prompt
;; arg - [lst] list of ssget arguments
(defun LM:ssget ( msg arg / sel )
(princ msg)
(setvar 'nomutt 1)
(setq sel (vl-catch-all-apply 'ssget arg))
(setvar 'nomutt 0)
(if (not (vl-catch-all-error-p sel)) sel)
)
;;----------------------------------------------------------------------;;
(vl-load-com)
(princ
(strcat
"\n:: INPUT.lsp loaded. | \\U+00A9 J.D. Sandifer "
(menucmd "m=$(edtime,0,yyyy)")
" ::"
)
)
(princ)
;;----------------------------------------------------------------------;;
;; End of File ;;
;;----------------------------------------------------------------------;;