VBA Code to rotate shape

Started by shannonl, November 07, 2011, 08:54:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

shannonl

I wrote some code to get one of my shapes to rotate 90 degress. I only need this shape to rotate when a textbox on my drawing says "ON".  The textbox displays live data. So it will either say "ON" or "OFF" depending on the live data...I can get this to work when i run the macro, but when i put the drawing on our server i'm guessing the code isn't getting ran because nothing is telling it to run.  Is there code that i could run the macro when drawing is loaded?

aledlund

Shannon,
VBA for animation is a dangerous implementation because it can eat a lot of cpu cycles, on a server it is a 'career altering decision' (dust off resume type of decision).
fyi,
al

shannonl

is there another way to do this instead of vba?  All i want is my shape to spin

Paul Herber

I think it is generally agreed that Visio cannot do this. The only opton might be an addon that used a timer which changed the shape's Angle cell at a certain interval. The code would take up too much time, it would also steal the selected shape focus which would make Visio unusable.

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

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

aledlund

If it were going onto a server, it would infer that somebody is attempting to web base some sort of 'status' tool. So hypothetically one solution would be to create the drawing in v2010, save it as xaml and then replace the existing shape with a xaml snippet that has motion. Some of the examples that I have seen use java and include a small avi file for the animation. In any case the smart thing to do is put a solution together that get's the animation off of the server and onto the client so that it doesn't disrupt other users and the network. It's an software architecture thing.
al