Visio Connectors Corrupted everytime closing and opening file (2013)

Started by Dean, February 03, 2016, 08:25:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dean

After making the diagram below:

http://i63.tinypic.com/16gn1ok.png

I save and close Visio.

After reopening I get the following diagram:

http://i65.tinypic.com/2ezsaoi.jpg

It happens every time, all the arrows go bonkers. It gets fixed by moving the boxes around anf the arrows appear correctly.

kiler40


Dean

Hi Kiler40.

Please find attached in link

http://jmp.sh/e98CBB4

I sanitised all information as it was sensitive. So all the blocks are named randomly.

I did find something else whilst doing this. I realised that when I delete the BACKGROUND TAB called "VBackground1" the arrows become normal again after saving! Is there any way I can keep the background tab without making arrows go haywire?

Dean

kiler40

Hi There,
Unfortunately i have only V2010 and can`t open this file type.
Can it work in VSD file format ?


kiler40

Hi Dean,
I cant imitate the issue you have.
I have created also background page... but still no issue.
Maybe it is something with the file format (as stupid as it sounds  ??? )
But you may try to put this code in ThisDocument

Private Sub Document_DocumentOpened(ByVal Doc As IVDocument)
Dim OrigPage As Visio.Page
Dim CurrPage As Visio.Page

Set OrigPage = Application.ActiveWindow.Page

For Each CurrPage In Application.ActiveDocument.Pages
Application.ActiveWindow.Page = CurrPage
Application.ActiveWindow.Zoom = -1
Dim a As Double, b As Double, c As Double, d As Double
    ActiveWindow.GetViewRect a, b, c, d
    ActiveWindow.SetViewRect a, b, c, d + 1
    ActiveWindow.SetViewRect a, b, c, d
    Next


Application.ActiveWindow.Page = OrigPage
Application.ActiveWindow.Activate
   
End Sub


It will basically redraw your page views.
Tell me if this is helping. If not we can think of different solution :)

Surrogate


kiler40

QuoteIt gets fixed by moving the boxes around anf the arrows appear correctly.
Since i was not sure if he is moving each individual box, or if he moves once and all get correct i thought that it may be a problem in visualizing.
Also if there is no background it is again correct.
And as i said i was not able to repeat the problem :)

Surrogate

Quote from: kiler40 on February 04, 2016, 09:53:29 AMAnd as i said i was not able to repeat the problem :)
kiler40, you use visio 2010 and me too. We cann't repeat this problem
I think problem repeat only in Visio2013...

kiler40


AndyW

Live life with an open mind

Dean

Quote from: kiler40 on February 04, 2016, 07:49:16 AM
Hi Dean,
I cant imitate the issue you have.
I have created also background page... but still no issue.
Maybe it is something with the file format (as stupid as it sounds  ??? )
But you may try to put this code in ThisDocument

Private Sub Document_DocumentOpened(ByVal Doc As IVDocument)
Dim OrigPage As Visio.Page
Dim CurrPage As Visio.Page

Set OrigPage = Application.ActiveWindow.Page

For Each CurrPage In Application.ActiveDocument.Pages
Application.ActiveWindow.Page = CurrPage
Application.ActiveWindow.Zoom = -1
Dim a As Double, b As Double, c As Double, d As Double
    ActiveWindow.GetViewRect a, b, c, d
    ActiveWindow.SetViewRect a, b, c, d + 1
    ActiveWindow.SetViewRect a, b, c, d
    Next


Application.ActiveWindow.Page = OrigPage
Application.ActiveWindow.Activate
   
End Sub


It will basically redraw your page views.
Tell me if this is helping. If not we can think of different solution :)

Nope, didnt help.

Can anybody help me? Im getting desperate

Surrogate


Surrogate

kiler40, topic starter wrote
Quote from: Dean on February 16, 2016, 08:21:09 AMNope, didnt help.
which difference between your codes in posts #29592 and #29431 ???
on my PC with visio2010 this file works fine too! Do you use visio 2013 ?

kiler40

AHHHHHH.
My bad :)
I actually don`t have Visio on my PC and i`m using one on a terminal server.
And sometimes it messes up the content in the clipboard...
I removed the other post. This is the code i wanted to post:
Private Sub Document_DocumentOpened(ByVal Doc As IVDocument)
Dim OrigPage As Visio.Page
Dim CurrPage As Visio.Page
Dim shp As Visio.Shape

Set OrigPage = Application.ActiveWindow.Page

For Each CurrPage In Application.ActiveDocument.Pages

For Each shp In ActivePage.Shapes
        If shp.OneD = False Then
            shp.Cells("PinX") = shp.Cells("PinX") + 0.01
            shp.Cells("PinX") = shp.Cells("PinX") - 0.01
        End If
           
Next shp
Next


Application.ActiveWindow.Page = OrigPage
Application.ActiveWindow.Activate
   
End Sub