Jump to content

UCS Angular degrees


Recommended Posts

Posted

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.

Posted (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 by lpseifert
Posted

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.

Posted

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

Posted

Hope you don't mind to take a look at the attached image ?

 

Thank you Sir.

UCS.jpg

Posted

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)

Posted

(angtos (angle '(0 0 0) (getvar "ucsxdir")) 0 4)

 

 

Yes. This one that you added after two replies. :lol:

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,:lol: 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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...