Code Red > AutoLISP (Vanilla / Visual)

Check for Model Space UCS = World

(1/2) > >>

DanB:
In LISP, how does one check model space to see if the UCS is set to World? I have a simple cut-n-paste routine I have been meaning to add this too.

ronjonp:
This is what I use:


--- Code: ---(if (equal (getvar 'ucsxdir) '(1.0 0.0 0.0) 0.0000001)
  (princ "\nUCS is world...")
  (princ "\nUCS not world...")
)
--- End code ---

T.Willey:

--- Quote from: ronjonp on April 22, 2008, 03:42:23 PM ---This is what I use:


--- Code: ---(if (equal (getvar 'ucsxdir) '(1.0 0.0 0.0) 0.0000001)
  (princ "\nUCS is world...")
  (princ "\nUCS not world...")
)
--- End code ---


--- End quote ---
If the ucs is rotated around the 'x' axis then this code will be lieing, as the ucs is not world.  I would think you would have to check at least two axis, but I wasn't sure that is why I didn't post an answer.

DanB:
Thanks, I think for the simple checking I need this may work. If anyone else has a different method please feel free to share as well.

CADaver:
What about WORLDUCS ?


--- Code: ---(if
   (equal (getvar 'worlducs) 1)
   (princ "\nUCS is world...")
   (princ "\nUCS not world...")
)

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version