AStorey Posted March 8, 2017 Posted March 8, 2017 Once upon a time I had a lsp routine called "untwist". Once a drawing was dview twisted (or having used the "twist" lsp) this "untwist" would rotate back to 0 and set the snapang to 0 as well! I miss it. Can anyone help me out. It's been so long now. Quote
broncos15 Posted March 8, 2017 Posted March 8, 2017 Once upon a time I had a lsp routine called "untwist". Once a drawing was dview twisted (or having used the "twist" lsp) this "untwist" would rotate back to 0 and set the snapang to 0 as well!I miss it. Can anyone help me out. It's been so long now. All you need to do is use the plan world command and reset the snapang and angbase. You can also make sure to set the zoom the same by checking the variables viewsize and viewctr. (if (not (= 1 (getvar 'cvport)))(command "._plan" "_w")) (setvar 'snapang 0) (setvar 'angbase 0) Quote
AStorey Posted March 9, 2017 Author Posted March 9, 2017 All you need to do is use the plan world command and reset the snapang and angbase. You can also make sure to set the zoom the same by checking the variables viewsize and viewctr. (if (not (= 1 (getvar 'cvport)))(command "._plan" "_w")) (setvar 'snapang 0) (setvar 'angbase 0) Thanks for the reply. I am not fluent in LISP. Okay, I do not speak LISP at all! There's the confession. Is your code actually the lisp that I can use? Or is that a few ideas to go by? I was spoiled by having that lisp at one time. Wish I had put it in my pocket for later use. Much appreciated. Quote
ReMark Posted March 9, 2017 Posted March 9, 2017 A possible substitution for the lisp you referred to above. http://cadtips.cadalyst.com/other/perform-dview-twist-quickly Quote
broncos15 Posted March 9, 2017 Posted March 9, 2017 Quickly written and untested: (defun c:plan2 (/ *error* ctr ht) (defun *error* (msg) (LM:endundo (LM:acdoc)) (if (not (member msg '("Function cancelled" "quit / exit abort")) ) (princ (strcat "\nError: " msg)) ) (princ) ) (if (> (getvar 'cvport) 1) (progn (LM:startundo (LM:acdoc)) (command "._ucs" "_w") (setq ctr (getvar 'viewctr) ht (getvar 'viewsize) ) (command "._plan" "_W") (setvar 'snapang 0) (setvar 'angbase 0) (command "zoom" "c" ctr ht) (LM:endundo (LM:acdoc)) ) ) (princ) ) ;;;Created by Lee Mac (defun LM:startundo (doc) (LM:endundo doc) (vla-startundomark doc) ) ;;;Created by Lee Mac (defun LM:endundo (doc) (while (= 8 (logand 8 (getvar 'undoctl))) (vla-endundomark doc) ) ) ;;;Created by Lee Mac (defun LM:acdoc nil (eval (list 'defun 'LM:acdoc 'nil (vla-get-activedocument (vlax-get-acad-object)))) (LM:acdoc) ) Quote
AStorey Posted March 9, 2017 Author Posted March 9, 2017 Well, you are the king! It works. I could never had done that. Many, many thanks. Quote
tombu Posted March 9, 2017 Posted March 9, 2017 How about a simple macro? ^C^C_dview;all;;tw;0;^P(progn(setvar "snapang" 0)(princ)) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.