Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: wapperdude on December 17, 2008, 06:19:52 PM

Title: Circle up the wagons, the arc is here!
Post by: wapperdude on December 17, 2008, 06: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
Title: Re: Circle up the wagons, the arc is here!
Post by: NOT_VisioGuy on December 26, 2008, 07:24:15 PM
If the start angle is "0" (zero) you get a divide by zero error @ line
-If dAngStop / dAngStart > 2 * PI Then-
Title: Re: Circle up the wagons, the arc is here!
Post by: Paul Herber on December 26, 2008, 07:35:20 PM
I think that should be

if (dAngStop - dAngStart) > 2 * PI Then

Title: Re: Circle up the wagons, the arc is here!
Post by: wapperdude on December 26, 2008, 10: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
Title: Re: Circle up the wagons, the arc is here!
Post by: wapperdude on May 25, 2009, 03:32:37 PM
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
Title: Re: Circle up the wagons, the arc is here!
Post by: wapperdude on July 27, 2009, 04:44:49 AM
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
Title: Re: Circle up the wagons, the arc is here!
Post by: wapperdude on July 27, 2009, 04:48:34 AM
Part 2:  the Visio file.
Title: Re: Circle up the wagons, the arc is here!
Post by: Visio Guy on July 27, 2009, 05: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)

:)