Author Topic: Default angle for the command Rotate.  (Read 2004 times)

0 Members and 1 Guest are viewing this topic.

velasquez

  • Newt
  • Posts: 195
Default angle for the command Rotate.
« on: July 14, 2009, 07:18:28 AM »
How to know where the last value used in the command Rotate it is stored?

Command:
ROTATE
Current positive angle in UCS:  ANGDIR=counterclockwise  ANGBASE=0
Select objects: Specify opposite corner: 1 found
Select objects:
Specify base point: _mid of
Specify rotation angle or [Copy/Reference] <45>:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: Default angle for the command Rotate.
« Reply #1 on: July 14, 2009, 08:15:12 AM »
just a guess, but perhaps lastangle
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Default angle for the command Rotate.
« Reply #2 on: July 14, 2009, 08:27:56 AM »
I thought that too, but when I looked it up, I found that it was the last angle entered for the End Angle for an Arc... but i think it is for both  :-)

Joe Burke

  • Guest
Re: Default angle for the command Rotate.
« Reply #3 on: July 14, 2009, 09:41:40 AM »
I think that's not true. The lastangle variable only stores the angular value of the last arc drawn, as help indicates.

I don't know where the last rotation angle is stored. It may be internal without a corresponding system var.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Default angle for the command Rotate.
« Reply #4 on: July 14, 2009, 10:22:09 AM »
There is almost always a 'Work Around'.
What are you trying to accomplish?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Spike Wilbury

  • Guest
Re: Default angle for the command Rotate.
« Reply #5 on: July 14, 2009, 11:01:57 AM »
I think I remember this - from many moons ago, and forgot the possible workaround...

This must be a local global variable that cannot be accessed or exposed, since it is not being saved on the drawing nor on the registry - if you set up an angle it will be in use until you close the drawing session, next time it will go back to 0.0

my -2.0 pesos that today is at the rate of 14.0/per dollar (those 14.0 pesos were $1,120 USD in 1976)

velasquez

  • Newt
  • Posts: 195
Re: Default angle for the command Rotate.
« Reply #6 on: July 14, 2009, 12:39:03 PM »
I need to do this value to be same to 0.0 for the user to press ENTER.

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Default angle for the command Rotate.
« Reply #7 on: July 14, 2009, 12:49:08 PM »
Are you saying that if the default rotation is 0.0, then the user must hit enter, or the code is such that it skips the prompt?

velasquez

  • Newt
  • Posts: 195
Re: Default angle for the command Rotate.
« Reply #8 on: July 14, 2009, 02:25:35 PM »
Yes
A block is inserted, and after some thing he can be rotacionado. 
I want that the command Rotate always accepts 0 if the user presses Enter. 
(princ "\nÂngulo de rotação <0>: ")
(command "_.rotate" "_l" "" JoyPt pause)

Spike Wilbury

  • Guest
Re: Default angle for the command Rotate.
« Reply #9 on: July 14, 2009, 02:43:43 PM »
Yes
A block is inserted, and after some thing he can be rotacionado. 
I want that the command Rotate always accepts 0 if the user presses Enter. 
(princ "\nÂngulo de rotação <0>: ")
(command "_.rotate" "_l" "" JoyPt pause)


An object reactor then ... maybe?

There is some stuff here that might be useful like:

http://www.theswamp.org/index.php?topic=9441.msg214752#msg214752

Lee Mac

  • Seagull
  • Posts: 12913
  • London, England
Re: Default angle for the command Rotate.
« Reply #10 on: July 14, 2009, 03:02:56 PM »
Why not prompt for the rotation before invoking the insert command?

For example:

Code: [Select]
(setq ang (getangle "\nSpecify Rotation Angle <0> : "))
(or ang (setq ang 0.0))

But, remember getangle returns in radians.  :-)

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Default angle for the command Rotate.
« Reply #11 on: July 14, 2009, 03:05:56 PM »
Not very elegant but it works.
Code: [Select]
(princ "\nÂngulo de rotação <0>: ")
(command "_.rotate" "_l" "" "_non" JoyPt 0) ; force zero default
(command "_.rotate" "_l" "" "_non" JoyPt pause)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.