chulse Posted April 12, 2010 Posted April 12, 2010 Ok, I found this little gem (a reactor to do various things on file close) from ASMI. What I'd like is to have it also automatically set the UCS to world on file close. If I understand correctly that you cannot use "command" in a reactor (read here that I am completely new to reactors...and almost completely new to lisp...), is there another method for changing the UCS back to world that would work? Thanks Quote
Lee Mac Posted April 12, 2010 Posted April 12, 2010 I'm not sure of any other way to do it other than by creating a temporary UCS: (defun UCSWorld (/ doc tmp) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object))) (vla-put-ActiveUCS doc (vla-add (vla-get-usercoordinatesystems doc) (vlax-3D-point '(0. 0. 0.)) (vlax-3D-point '(1. 0. 0.)) (vlax-3D-point '(0. 1. 0.)) "TempWord_UCS"))) Quote
Lee Mac Posted April 13, 2010 Posted April 13, 2010 Thanks Lee! You're welcome - its not perfect, and a bit of a workaround - I would welcome anyone to submit a better way. Quote
alanjt Posted April 13, 2010 Posted April 13, 2010 You're welcome - its not perfect, and a bit of a workaround - I would welcome anyone to submit a better way. Thanks how I would do it. I used the same coding to do the same thing a while back. I just called it "World" and left it there. Quote
Lee Mac Posted April 13, 2010 Posted April 13, 2010 Thanks how I would do it.I used the same coding to do the same thing a while back. I just called it "World" and left it there. I think I picked it up from somewhere in theSwamp - I wish there was a better way to do it. Quote
alanjt Posted April 13, 2010 Posted April 13, 2010 I think I picked it up from somewhere in theSwamp Same here. 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.