-
Notifications
You must be signed in to change notification settings - Fork 0
/
CCC-copybase.lsp
52 lines (46 loc) · 1.36 KB
/
CCC-copybase.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
;Copy/Paste to original coordinates in any UCS
;www.cadforum.cz - 2012
;(command "_undefine" "_copyclip" "_undefine" "_copybase" "_undefine" "_pasteclip")
(defun c:ccc ( / ss )
(defun *error* (msg) (command "_ucs" "_p")(setvar "cmdecho" 1)(princ (strcat "Err: " msg)))
(setvar "cmdecho" 0)
(setq ss (ssget "_I"))
(command "_ucs" "")
(if (not ss) (setq ss (ssget)))
(if ss (progn (command "_.copybase" '(0 0 0) ss "")(princ "\nPaste with VVV")))
(command "_ucs" "_p")
(setvar "cmdecho" 1)
(princ)
)
(defun c:ccx ( / ss )
(defun *error* (msg) (command "_ucs" "_p")(setvar "cmdecho" 1)(princ (strcat "Err: " msg)))
(setvar "cmdecho" 0)
(setq ss (ssget "_I"))
(command "_ucs" "")
(if (not ss) (setq ss (ssget)))
(if ss (progn (command "_.copybase" '(0 0 0) ss "")(princ "\nPaste with VVV")))
(command "_ucs" "_p")
(setvar "cmdecho" 1)
(command "_.pselect" "_p" "")
(command "_.erase")
(princ)
)
(defun c:vvv ()
(setvar "cmdecho" 0)
(command "_ucs" "")
(command "_.pasteclip" '(0 0 0))
(command "_ucs" "_p")
(setvar "cmdecho" 1)
(princ)
)
(defun c:vvx ()
(setvar "cmdecho" 0)
(command "_ucs" "")
(command "_.pasteclip" '(0 0 0))
(command "_.pselect" "_p" "")
(command "_.zoom" "o")
(command "_ucs" "_p")
(setvar "cmdecho" 1)
(princ)
)
(princ "\nCopy/Paste orig in any UCS - use CCC and VVV commands")(princ)