Macro API

Started by Toaster, May 18, 2009, 05:25:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Toaster

I am power office user and software developer; so I have written a few macros in my time.  I have found the visio API to be somewhat complicated.
It seems that the API design tradeoff was for cpu efficiency over usability -- some of us would rejoice if a second, simpler, more intuitive (from an average user's pov) API could be provided for those of us who just want to bang out a macro now and then.

Visio Guy

#1
Hi Toaster,

The API starts to get simpler if you understand the ShapeSheet--which isn't simple.

You can do a huge number of things once you understand that you need to get into the cells of a shape, ie:

shp.Cells("Width").ResultIU = 2.5
shp.Cells("User.myData").FormulaForce = "" & "One;Two;Three" & ""

But I agree with you: a programmer has to go to deep to get Visio to do anything.

It would be nice to have simpler, more intuitive operations like shp.FillColor = Colors.Red or shp.TextBehavior = SizeWithShapeHeight, etc.

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

Toaster

Thanks, I will take a closer look at ShapeSheet next time I roll up my sleeves to write a macro. 
Sometimes the right starting point can make a big difference. :)