Author Topic: Shape Help - Change the orientation of Zero Degrees  (Read 5087 times)

0 Members and 1 Guest are viewing this topic.

zhollett

  • Newbie
  • *
  • Posts: 2
Shape Help - Change the orientation of Zero Degrees
« on: March 17, 2010, 12:19:22 PM »
Hi, I hope this is in the right place and Thanks for any assistance.

What I am attempting to do is change the orientation of a shape so that Zero Degrees (0º) is in the 9 o'clock position instead of the 12 o'clock position.

The reason I am doing this is because I want to create a Tachometer object and the center arrow is going to be the pointer.

Right now, if the input is at say 30% of full speed, I am having troubles getting the arrow to sit at the proper angle.

The reason is that 30% of full speed *should* be easy to calculate as in 30% of 180º but because the orientation of the shape has 0º at the top 12 o'clock position and progressing thru degrees of rotation is to the left (anti-clockwise) it becomes really difficult to calculate the math.

The same situation is if the input is at 76% of full speed.  That side of the Tachometer (from 50% to 100%) uses angles 360º to 270º.

Its really confusing to me.

So, to make things easier for me, I would like to change the orientation of the object so that 0º sits in the 9 o'clock position and then have the degrees of rotation move in the clockwise position.

I'm sorry if this sounds a bit confusing.

Notes:
1. 0º is at the top of the shape or the 12 o'clock position
2. Going through positive angle progression occurs in the anti-clockwise direction
3. I want 0º to be at the 9 o'clock position
4. I want positive angle progression to happen in the clockwise direction

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4888
  • Ideas Visio-lized into solutions
Re: Shape Help - Change the orientation of Zero Degrees
« Reply #1 on: March 17, 2010, 02:00:51 PM »
To move the position of the "0 deg" there are two possibilities for your arrow. 
  1>  If it is a custom shape, redraw it with the correct orientation.
  2>  If that is not an option, then, you can add a fixed offset to the angle. 

To change the direction of rotation, multiply your value by "-1".

To correct split angle thing, use the function ang360(your value).  See http://msdn.microsoft.com/en-us/library/ms406637.aspx

I've attached an example to pull of this together...
Visio 2019 Pro

zhollett

  • Newbie
  • *
  • Posts: 2
Re: Shape Help - Change the orientation of Zero Degrees
« Reply #2 on: March 17, 2010, 04:22:48 PM »
Thanks Wapperdude.

I went with the ANG360 option and it worked perfectly.

I appreciate your quick (and correct) responses.

You are an asset to this forum.

Take care
Zach

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4888
  • Ideas Visio-lized into solutions
Re: Shape Help - Change the orientation of Zero Degrees
« Reply #3 on: March 18, 2010, 02:08:19 PM »
Hey Zach --

Thanks for the kind words!   ;D 

Glad everything worked out.

Wapperdude
Visio 2019 Pro