R
RobC
Hi,
I just upgraded to Visio 2003 from 2002 and I cannot show movement in my
drawings as I did in 2002. I have a drawing and I was animating
movement with the following code. In Visio 2002, I used the
(winObj.Select shpObj, visDeselect) command to force the screen to
update while in the loop which showed nice smooth movement, however in
2003 it no longer works. It just shows the final movement / placement
after the routine in complete. I tried (Application.ScreenUpdating =
True) to no avail and (ShowChanges = True) but always Method not
Supported but my understanding is that is always true unles set to
false.
Any help would be appreciated... Thanks, Rob
Private Sub CommandButton1_Click()
'On Error Resume Next
If WheelsUp = False Then
Dim i As Long
Dim ang As Integer
ang = 0
Set winObj = Visio.ActiveWindow
Set shpsObj = ThisDocument.Pages.Item("FullSide").Shapes
Set shpObj = shpsObj.Item("Sheet.40")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang >= -40
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang - 1
Loop
Set shpObj = shpsObj.Item("Sheet.3")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang >= -25
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang - 1
Loop
Call Sleep(300)
Set shpObj = shpsObj.Item("Sheet.85")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang <= 40
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang + 1
Loop
Set shpObj = shpsObj.Item("Sheet.21")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang <= 25
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang + 1
Loop
WheelsUp = True
End If
End Sub
I just upgraded to Visio 2003 from 2002 and I cannot show movement in my
drawings as I did in 2002. I have a drawing and I was animating
movement with the following code. In Visio 2002, I used the
(winObj.Select shpObj, visDeselect) command to force the screen to
update while in the loop which showed nice smooth movement, however in
2003 it no longer works. It just shows the final movement / placement
after the routine in complete. I tried (Application.ScreenUpdating =
True) to no avail and (ShowChanges = True) but always Method not
Supported but my understanding is that is always true unles set to
false.
Any help would be appreciated... Thanks, Rob
Private Sub CommandButton1_Click()
'On Error Resume Next
If WheelsUp = False Then
Dim i As Long
Dim ang As Integer
ang = 0
Set winObj = Visio.ActiveWindow
Set shpsObj = ThisDocument.Pages.Item("FullSide").Shapes
Set shpObj = shpsObj.Item("Sheet.40")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang >= -40
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang - 1
Loop
Set shpObj = shpsObj.Item("Sheet.3")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang >= -25
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang - 1
Loop
Call Sleep(300)
Set shpObj = shpsObj.Item("Sheet.85")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang <= 40
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang + 1
Loop
Set shpObj = shpsObj.Item("Sheet.21")
Set celObj = shpObj.Cells("Angle")
ang = 0
Do While ang <= 25
celObj.Formula = ang & "deg"
Application.ScreenUpdating = True
Call Sleep(10)
winObj.Select shpObj, visDeselect
celObj.Formula = ang & "deg"
ang = ang + 1
Loop
WheelsUp = True
End If
End Sub