Visio Guy

Visio Discussions => General Visio => Topic started by: Dean on February 03, 2016, 08:25:45 AM

Title: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Dean on February 03, 2016, 08:25:45 AM
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.
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: kiler40 on February 03, 2016, 01:53:39 PM
Hi Dean,
Can you share the VSD file ?
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Dean on February 03, 2016, 05:23:21 PM
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
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: kiler40 on February 04, 2016, 06:31:37 AM
Hi There,
Unfortunately i have only V2010 and can`t open this file type.
Can it work in VSD file format ?
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Dean on February 04, 2016, 07:07:28 AM
Please see attached vsd file

https://jumpshare.com/v/sXRCTxiGzsRJ3UalnEiU

Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: 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 :)
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Surrogate on February 04, 2016, 09:31:04 AM
Quote from: kiler40 on February 04, 2016, 07:49:16 AMTell me if this is helping.
How page redrawing can fix connector's arrow ?
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: kiler40 on February 04, 2016, 09:53:29 AM
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 :)
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Surrogate on February 04, 2016, 10:04:39 AM
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 (http://visio.getbb.ru/images/ranks/visio_getbb_ru/huh.gif)
I think problem repeat only in Visio2013...
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: kiler40 on February 04, 2016, 10:09:12 AM
Quote from: Surrogate on February 04, 2016, 10:04:39 AM
I think problem repeat only in Visio2013...
Maybe if staying in older file format will also help? ???
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: AndyW on February 04, 2016, 10:35:04 AM
Works fine for me in Visio 2016
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Dean on February 16, 2016, 08:21:09 AM
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
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Surrogate on February 16, 2016, 08:24:20 AM
Quote from: Dean on February 16, 2016, 08:21:09 AMCan anybody help me? Im getting desperate
just don't use visio2013
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Surrogate on February 16, 2016, 10:06:27 AM
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 (http://visguy.com/vgforum/index.php?topic=7021.msg29592#msg29592) and #29431 (http://visguy.com/vgforum/index.php?topic=7021.msg29431#msg29431) ???
on my PC with visio2010 this file works fine too! Do you use visio 2013 ?
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: kiler40 on February 16, 2016, 12:29:10 PM
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
Title: Re: Visio Connectors Corrupted everytime closing and opening file (2013)
Post by: Surrogate on February 16, 2016, 01:54:54 PM
Dean,
(http://oi65.tinypic.com/2ezsaoi.jpg)
this connectors really become shorter ? or their parts became invisible ?