Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: sindemic on May 05, 2015, 09:29:53 AM

Title: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 09:29:53 AM
Hello Gurus,

I want the width of a TextfieldShape to be the same as another TextfieldShape from the Background-Page.
I found this:
Pages[page name]!Sheet.n!Width
But that only works with foregroundpages.

Anyone has an idea?
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 09:43:08 AM
i guess something like
QuotePages[Background-2]!Sheet.1!Width
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 10:04:05 AM
i tried that, but that doesn't work (Pop Up: error in the formula)
it would work if i use the formula with a forground page like "Pages[Page-2]!Sheet.1!Width"
But i Need it for a Background page sheet
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 11:09:47 AM
Quote from: sindemic on May 05, 2015, 10:04:05 AM
But i Need it for a Background page sheet
Pages[Background-1]!ThePage!User.ololo i try this in visio2010, it is correct on my PC
Title: Re: Connecting Shape from Background-Page
Post by: Paul Herber on May 05, 2015, 11:31:45 AM
Maybe a simple question ... do you have the correct shape name?
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 11:35:09 AM
may be you need get background's page width ?
Pages[Background-1]!ThePage!PageWidth
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 11:46:18 AM
Hello Paul,
yes, i have the correct shape, in my case it is sheet.18 from the Background-1 page.
i tried:
Pages[Background-1]!PageSheet.18!Width
Pages[Background-1]!ThePage!PageWidth      (for testing)
Pages[Background-1]!ThePage!Sheet.18!Width
Nothins works. Everytime the PopUp.
I Forget to say that i use visio 2013
Title: Re: Connecting Shape from Background-Page
Post by: Paul Herber on May 05, 2015, 11:58:55 AM
[Moderator] - I've moved this thread into the Visio 2013 area.
Title: Re: Connecting Shape from Background-Page
Post by: Paul Herber on May 05, 2015, 12:04:00 PM
Try the attached file:
The Page-1 shape PinX is tied to the background Page-2 shape PinX, so moving the background shape will cause the Page-1 shape to move.
P.S. the formula isn't guarded so moving the shape on Page-1 will overwrite the formula.
The formula is =Pages[Page-2]!Sheet.1!PinX
This is in Visio 2010. I don't touch Visio 2013 with a bargepole.
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 12:17:23 PM
thx for moving.

i hope i understand it right.
i named the backgroundpage : "Page-2"
the normal forgrounnd page called "Page-1"
i entered in Page-1 Sheet.1265 PinX : "=Pages[Page-2]!Sheet.18!PinX"
Same PopUp


i tried it again with a new normal forground page called "Zeichenseite-1" and sheet number 1
I tried:
=Pages[Zeichenseite-2]!Sheet.1!Width
same PopUp
I tried:
=Pages[Page-2]!Sheet.1!Width
and it works

i guess there is an error with Name reading
now i have to know, how visio called the first Background page.
i just tried:
background-0, background-1, background-2, backgroundpage-0, backgroundpage-1, backgroundpage-1, Background.page-0 and Background.page-1. i also tried to rename the Background-1 to Page-1/2/3. nothing helps 
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 12:32:02 PM
visio have two difference Local and Universal names of page
PageName(0) - local (non-english) pagename.
PageName(750) - universal pagename.

in shapesheet formula you need write only universal pagename. but via visio interface you see only local name! i get some problems with russian interface :)
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 12:35:39 PM
where i can see These local and universal page names?

maybe the Formular =Pages[page Name] isn't right because visio declare the Background not as a page
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 12:41:47 PM
Quote from: Visio Team (https://social.msdn.microsoft.com:443/profile/visio%20team/) 27 Jul 2006 в Name and NameU (https://surrogate-tm.github.io/visio/2006/07/27/name-and-nameu.htm)The local name is a friendly name that is displayed in the Visio user interface. For Visio's own content, this is a string translated for the product sku of Visio (i.e. German strings in German Visio).  Users have the ability to rename Page and Master and Cell objects, and that changes the local name.  Local names allow users to see things in a language that makes sense to them.

The universal name is hidden from the user interface and can only be updated through automation.  This keeps a universal name consistent across product versions and user edits.  A constant name allows solution developers to refer to objects by an identifier that makes sense to them.  This identifier works no matter what is displayed for the local name.

Read more... (https://surrogate-tm.github.io/visio/2006/07/27/name-and-nameu.htm)
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 12:47:21 PM
sometimes ago i make this hint (see post in russian (http://visio.getbb.ru/viewtopic.php?p=6303#p6303)). but i can't tranlate this to english :(

i think this problem in not Visio'2013 issue :)
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 01:08:44 PM
i just translate it with Google. i feel like i understand it :-)

the Output was:
ActiveWindow.Selection(1).Cells("WIDTH").FormulaU = "pages[VHintergrund-1]!sheet.18!width"

so tried in Page-1:
=Pages[VHintergrund-1]!Sheet.18!Width
and it works :-)
i didn't still know what is the english universal Name of the Background page, but at least the german local one.

Thank you Surrogate
AND thanks Paul
Title: Re: Connecting Shape from Background-Page
Post by: Paul Herber on May 05, 2015, 01:11:10 PM
I have a utility that can help with this problem:
http://www.paulherber.co.uk/visio-utilities/ (http://www.paulherber.co.uk/visio-utilities/)
Page report and Shapes on Page report show Name, NameU and Sheet reference.
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 01:21:07 PM
Thanks for the link Paul
Title: Re: Connecting Shape from Background-Page
Post by: Surrogate on May 05, 2015, 02:03:50 PM
Quote from: sindemic on May 05, 2015, 01:08:44 PMi didn't still know what is the english universal Name of the Background page, but at least the german local one.
Not at all...
(http://forumimage.ru/uploads/20150219/142435559524707154.gif)
Local and universal pagenames after second renaming are different! (http://visio.getbb.ru/viewtopic.php?p=6521#p6521)
Title: Re: Connecting Shape from Background-Page
Post by: sindemic on May 05, 2015, 03:06:57 PM
thanks again :-)