Circle up the wagons, the arc is here!

Started by wapperdude, December 17, 2008, 06:19:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

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

If the start angle is "0" (zero) you get a divide by zero error @ line
-If dAngStop / dAngStart > 2 * PI Then-

Paul Herber

I think that should be

if (dAngStop - dAngStart) > 2 * PI Then

Electronic and Electrical engineering, business and software stencils for Visio -

https://www.paulherber.co.uk/

wapperdude

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

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

#5
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
Visio 2019 Pro

wapperdude

Visio 2019 Pro

Visio Guy

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