Michaels Posted September 5, 2010 Posted September 5, 2010 Hello, I have a drawing which the UCS is rotated to a specific angle . How can I know the rotation (angle degree) of that UCS ? Many Thanks. Michaels. Quote
lpseifert Posted September 5, 2010 Posted September 5, 2010 (edited) this should return the angle in degrees of the X direction of the current UCS relative to the WCS (if the UCS has been rotated around the Z axis) (/ (* (angle '(0 0 0) (getvar "ucsxdir")) 180.0) pi) or if you prefer a string (angtos (angle '(0 0 0) (getvar "ucsxdir")) 0 4) Edited September 6, 2010 by lpseifert Quote
Michaels Posted September 6, 2010 Author Posted September 6, 2010 Thanks a lot. You codes return ( 0.0 ) as a new drawing angle settings. I wonder why. Could you please give me another solution ? Sincerely. Quote
lpseifert Posted September 6, 2010 Posted September 6, 2010 You codes return ( 0.0 ) as a new drawing angle settings. I wonder why. New drawing? Probably doesn't have a UCS. Turn on your UCS icon to see what direction the current CS is actually pointing Quote
Michaels Posted September 6, 2010 Author Posted September 6, 2010 Hope you don't mind to take a look at the attached image ? Thank you Sir. Quote
lpseifert Posted September 6, 2010 Posted September 6, 2010 It appears that you are currently in the WCS (see the square on the UCS icon?)... try UCS > View, then run the line of code Actually this may be easier, try this instead (angtos (getvar "viewtwist") 0 4) Quote
Michaels Posted September 6, 2010 Author Posted September 6, 2010 (angtos (angle '(0 0 0) (getvar "ucsxdir")) 0 4) Yes. This one that you added after two replies. Did give me the accurate angle degree in a string.which is the one that I am looking for. (angtos (angle '(0 0 0) (getvar "ucsxdir")) 0 4) Also the one that you added after posting, is really give the direct answer . (angtos (getvar "viewtwist") 0 4) So both are great. Thank you so much, also for your time. Appreciated. Michaels. 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.