Create ROTATE PREVIOUS command

Create ROTATE PREVIOUS command

lkirbyN6K85
Community Visitor Community Visitor
223 Views
2 Replies
Message 1 of 3

Create ROTATE PREVIOUS command

lkirbyN6K85
Community Visitor
Community Visitor

I type too fast and every time I try to move or rotate a previous selection, I end up with "MOP" or "ROP" and an "unknown command" error.

 

What would be the best way to create a command for these and assign an alias to them?  I want to be able to type "ROP", have it select the previous set, then prompt for a basepoint.

0 Likes
224 Views
2 Replies
Replies (2)
Message 2 of 3

paullimapa
Mentor
Mentor
(defun c:ROP ()
 (command "_.ROTATE" "_P" "")
)
(defun c:MOP ()
 (command "_.MOVE" "_P" "")
)

Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 3 of 3

Sea-Haven
Mentor
Mentor

Yep have the same 6 fingers problem added the typo in this.

 

; GOTO layout just like other goto a page
; By Alan H 2013
; menu command [GOTO]^c^C^p(load "goto")
; enter a big number like 99 to jump to last if 100+ layouts then 123 etc
; Model space is 0 zero GOTO 0

(defun C:goto ( / x alllayouts laynum num)
 (if (not AH:getvalsm)(load "Multi Getvals.lsp"))
(setq num (atoi (nth 0  (AH:getvalsm (list "Go To A Layout" "Enter layout number" 5 4 "1")))))
(setq alllayouts (vla-get-Layouts (vla-get-activedocument (vlax-get-acad-object))))
(SETQ LAYNUM 0)
(vlax-for x alllayouts
(Setq laynum (+ 1 laynum))
) ;total number of layouts
(if (> num laynum)
(setq num (- laynum 1))
)
(vlax-for lay alllayouts
(if (= num (vla-get-taborder lay))
(setvar "ctab" (vla-get-name lay))
)
)
)

; I often type it wrong so added this one also
(defun C:goot ()
(c:goto)
) ; defun

 

0 Likes