Making Animations in Visio

Started by davidoff, January 05, 2009, 03:43:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

davidoff

Hello friends,
I am making a factory layout, i want to show the material and finished good movements in the plan,
is it possible to make any animation in Visio 2007 ?

kind regards.



wapperdude

#1
Yes, it is possible thru code.  Vojo made an initial demostration of this and I took his effort to animate a Lava Lamp.  My last post on the following topic has the animated lamp, plus it refers to Vojo's original post.  His article might be what you're looking for.

http://visguy.com/vgforum/index.php?topic=521.0

HTH
Wapperdude.
Visio 2019 Pro

davidoff

#2
i will check it out, thank you!

davidoff

#3
Quote from: wapperdude on January 05, 2009, 03:52:10 PM
Yes, it is possible thru code.  Vojo made an initial demostration of this and I took his effort to animate a Lava Lamp.  My last post on the following topic has the animated lamp, plus it refers to Vojo's original post.  His article might be what you're looking for.

http://visguy.com/vgforum/index.php?topic=521.0

HTH
Wapperdude.

Dear Wapperdude, (thanks again)
i have downloaded the file but couldnt find the way to animate the object,
actually as i seem from the screenshot you change the color of the lamp,

i would like to know that if it is possible to move a car  (for example)

what i need, ( what i dream)

click on button,
and animate the object on special routes that have been done in visio.
just like on the attachment below.









wapperdude

Hi David --

Excuse the time lag, I'm on PST.  Assuming that you downloaded the file, Ani Lava Lamp.vsd, to run the animation you have to go to Tools > Macros > This Document > MoveIt.

I did not add a button or make any other provision to launch it.  Pretty much bare bones.  Certainly, you can add a button to launch a macro, as an example, see the attached file for changing text.  As far as moving a car along a path, Vojo's work does almost the exact task:  Re: Visio Animation Template, http://visguy.com/vgforum/index.php?topic=361.msg2617;topicseen#msg2617

HTH
Wapperdude
Visio 2019 Pro

davidoff

Dear Wapperdude whenever i try to run macro there is a error on screen:

Compile Error:
Wrong number of arguments or invalid property assingment.

The codes are seen below:

Sub ChgText()
    Dim vsoPage As Visio.Page, vsoShape As Visio.Shape
    Dim vsoCharacters1 As Visio.Characters, vsoStrng As String, vsoMyText As String
    vsoMyText = "NewText"
    vsoMyText = Chr(34) & vsoMyText & Chr(34)
   
    For Each vsoPage In ThisDocument.Pages
        For Each vsoShape In vsoPage.Shapes
            Set vsoCharacters1 = vsoShape.Characters
            vsoStrng = vsoCharacters1.Text                  'This step not necessary, vsoCharacters1.Text could be placed directly in the formula on the next line.
            vsoCharacters1.Text = Replace(vsoStrng, "MyText", vsoMyText)
        Next
    Next
End Sub

wapperdude

Hmmm.  That macro isn't used, you may delete it.  It was left over from doing copy/paste.

To execute the change text routine, click the Replace button.  The button runs a nearly identical macro under the UserForm code.  Not sure why the Replace fcn generates that error, but it was an issue with the originating post under Selection Box category:  find and replace shape text in Visio VBA, see http://visguy.com/vgforum/index.php?topic=581.0

I don't quite understand why that macro gives the replace error, because if you copy and replace it's code with the UserForm code, you still get that error.  Some sort of conflict/corruption, whatever.  If you copy the code and place it in a new file, it ought to work.   :P

HTH
Wapperdude
Visio 2019 Pro

davidoff

Quote from: wapperdude on January 08, 2009, 04:43:45 PM
Hmmm.  That macro isn't used, you may delete it.  It was left over from doing copy/paste.

To execute the change text routine, click the Replace button.  The button runs a nearly identical macro under the UserForm code.  Not sure why the Replace fcn generates that error, but it was an issue with the originating post under Selection Box category:  find and replace shape text in Visio VBA, see http://visguy.com/vgforum/index.php?topic=581.0

I don't quite understand why that macro gives the replace error, because if you copy and replace it's code with the UserForm code, you still get that error.  Some sort of conflict/corruption, whatever.  If you copy the code and place it in a new file, it ought to work.   :P

HTH
Wapperdude


hmmm a bit complicated solution for me.  ;D ;D ;D