"Undo Macro" Menu Item - How does it work?

K

Kait

Hi,

I have a Visio macro that automates the process of drawing charts.

1. A base shape is dragged onto the grid
2. A form is launched where the user enters a bunch of information about
the chart.
3. The chart is drawn.

The second stage is updating the chart. Each shape on the screen has
associated information that allows it to be reloaded in the form when an
"Update" macro is run.

1. Select "Update Chart"
2. Change chart options (add, delete, edit items)
3. Redraw the chart

Redrawing the chart starts from scratch. The previous chart is completely
removed.

PROBLEM:
When data is removed from the chart and Undo Macro is selected, then the
original chart is replaced correctly.
When data is added to or edited in the chart, the Undo Macro function
reproduces a chart that is significantly different from the original one.
Most of the shapes are in the wrong position, et cetera.

I looked for documentation on the Undo function for Visio, but I didn't find
enough information. I am wondering if there is something I can do on the
backend (inside the macro) to allow undos to work, or if it is a "feature" of
Visio that must be lived with. The macro is written for other users who find
the Undo feature to be very important.

The current edition of Visio being used is: Microsoft(R) Visio(R)
Professional 2002 SR-1 (10.0.2514)

NOTE: The drawing of the chart involves several steps. Depending on the
amount of information used, the steps could very well number over 100
individual shape drops, placement adjustments, lines and rectangles drawn, et
cetera.

I am wondering if somehow the Undo buffer is overrun or whatnot. Since you
don't undo every command (just one: "Undo Macro"), it is difficult to
determine what the actual problem is.

Thanks for your time,
Kait Williams
 
M

Mark Nelson [MS]

I'm confused. Are you talking about the user choosing the Undo command in
Visio, or have you written your own macro to perform actions similar to an
undo?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top