Author Topic: Circle up the wagons, the arc is here!  (Read 13539 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3481
  • Ideas Visio-lized into solutions
Circle up the wagons, the arc is here!
« on: December 17, 2008, 01:19:52 PM »
I decided to place the arc macro up here.  This macro allows you to place shapes along an arc or in a circle (like those old westerns back in the 1950's and 60's).  The arc feature is particularly helpful for placing chairs in a band, or whatever.

It's been updated yet again.  Some minor code improvements and new features which include:
1.)  The reference shape no longer has to be pre-rotated, but it does need to be selected.
2.)  The arc centers on the page for a very large radius.  This allows for a "flatter" arc.
3.)  The shapes number left to right.

Enjoy!
Wapperdude
Visio 2019 Pro

NOT_VisioGuy

  • Newbie
  • *
  • Posts: 1
Re: Circle up the wagons, the arc is here!
« Reply #1 on: December 26, 2008, 02:24:15 PM »
If the start angle is "0" (zero) you get a divide by zero error @ line
-If dAngStop / dAngStart > 2 * PI Then-

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2765
    • Paul Herber's website
Re: Circle up the wagons, the arc is here!
« Reply #2 on: December 26, 2008, 02:35:20 PM »
I think that should be
Code: [Select]
if (dAngStop - dAngStart) > 2 * PI Then
Electronic and Electrical engineering, business and software stencils and applications for Visio -

http://www.paulherber.co.uk/

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3481
  • Ideas Visio-lized into solutions
Re: Circle up the wagons, the arc is here!
« Reply #3 on: December 26, 2008, 05:18:25 PM »
Hey!  I feel like a successful software engineer -- a program with a feature found by an user!

The fix is easy enough, but, I have also found another feature.  The horizontal flip which does the numbering left to right, clockwise, doesn't always preserve the angles.  So, I re-did the macro to make the "construction" correct without doing the flip.  Both the arc and the circle have the 9 o'clock spot as the starting reference position.

Hopefully, there aren't any newly introduced errors.

Wapperdude
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3481
  • Ideas Visio-lized into solutions
Re: Circle up the wagons, the arc is here!
« Reply #4 on: May 25, 2009, 10:32:37 AM »
In reviewing this post, I realized that an omission of credit is missing.  So, with that, I'd like to say that Visio Guy's original macro, Polar Array, which may be found here: http://visio.mvps.org/VBA.htm, is the basis for the ArcArray macro. 

Wapperdude
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3481
  • Ideas Visio-lized into solutions
Re: Circle up the wagons, the arc is here!
« Reply #5 on: July 26, 2009, 11:44:49 PM »
The arcArray macro has been updated to include rainbow coloring.  For those unfamiliar with the arcArray, here's a very busy presentation of some of it's capabilities.  Any shape can be used.  Just plop it down on a drawing page, normal orientation, and then run the macro.  The shapes used were the "wacky" rectangle, and the basic star.  The multicolor circles use the shape / fill pattern below, and then create a circle with say, 180 shapes.  Set the radius to just slightly less than 1/2 the shape height.

Enjoy!
Wapperdue

Looks like a two part post, Visio file to big to make it under the 500-KB limit
« Last Edit: July 26, 2009, 11:47:54 PM by wapperdude »
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3481
  • Ideas Visio-lized into solutions
Re: Circle up the wagons, the arc is here!
« Reply #6 on: July 26, 2009, 11:48:34 PM »
Part 2:  the Visio file.
Visio 2019 Pro

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1644
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Circle up the wagons, the arc is here!
« Reply #7 on: July 27, 2009, 12:04:43 PM »
Nice job, W!

Since Visio won't give us the right types of fills, we'll just do GDI+ ourselves! (GDI = low-level windows graphics calls)

:)
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010