Link Data from Footline to a Shape

Started by ab8421, May 15, 2014, 08:44:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ab8421

Hi,

I am new to Visio.

I mada a Template with a Footline in the Background, which works proper.

Now I would like to link anyhow the information from the footline into a shape. Such as reading the title out of the foot line and display it on the title page. It would lead to entering project datas just once in the background frame....

does anyone has an idea? I tried the sheetshaps but got no cloue about it


Thx

Jumpy

I think you mean ShapeSheet  :D

And to reference data from another Shape or another Page look here:

http://msdn.microsoft.com/en-us/library/office/ff768760%28v=office.15%29.aspx

ab8421

Well, still I don't get it to work.
Thats what I did:

New Shape.
Erase all ShapeData and put a new one "BlockNo", then I named it under ShapeName with "ShapeBlockNo"
I insered a text field with the "BlockNo".
Pretty easy so far.

Now I want to copy this information in more Shapes (but just this Master can change the Value)
So i do a new Shape, insert a text field, go to custom Formula and insert "=ShapeBlockNo!BlockNo" (as shown here http://msdn.microsoft.com/en-us/library/office/ff768760%28v=office.15%29.aspx).
Visio does not accept this Name....what am I doing wrong?

Jumpy


Should be "=ShapeBlockNo!Prop.BlockNo" (if both shapes are on the same page).

(Prop=ShapeData)

Maybe the altered name "ShapeBlockNo" is not usable in ShapeSheet. Name and NameU of the shape have to be ShapeBlockNo.
Eventually you have to use Visio's notation in the formula and use for example Sheet.123.
"=Sheet.123!Prop.BlockNo"

ab8421


ab8421

Sorry but somehow I am still working around the same problem.

I made nice shapes which are reading a value from the "document User defined Cells" like "User.BlockNo". Thats working pretty fine.

Now I would like to define a background (because thoose aren't printed out) to make some shapes where I can easily enter and change this User.values.
So what i am trying: for my document value "User.BlockNo" to enter in the cell "value" something like "= get value from page.1/shape.block/value.BlockNo".

But i don t get it to work, calling Informations over more pages. I m trying it in reference to http://msdn.microsoft.com/de-de/library/office/ff768760(v=office.15).aspx, but always tells me Error in Formular


Jumpy

page.1/shape.block/value.BlockNo

=Pages[Page-1]!Sheet.123!User.BlockNo (if Sheet.123 is shape.block).

or

=Pages[Page-1]!Block!User.BlockNo

Block has to be the NameU of the Shape and Page-1 has to be the NameU of the page. You have to check (in ShapeSheet or Drawing Explorer) if you really have the right NameUs (not the Name, the NameU!!!) for referencing in the ShaoeSheet).

ab8421

I can't finde the NameU. No where, neither in the Draawing Explorer nor in the ShapeSheet.

Embarrassing but I am not able to get it to work. So I took a totaly new File, didn't change any Names so Names=NameUs! right?

Page one I drop in a Shape (will have automaticly name/nameU Process.1) do a right click and define shape data as InpBlockNo.
Insert a second Page (automatic name is Page-2), insert a shape (automatic name is Process.2). Here I insert a field with Custom Formula =Pages[Page-1]!Process.1!prop.InpBlockNo

For me it should work as far as I understood the Syntax. If I get this to work I could insert the same to my document values....

Did I missunderstood something?

Jumpy

#8
Hello,

the steps you described should work.

Some small VBA-macros to help find out Name / NameU of a shape:

Sub ShapeCheck()
  'Needs a selected shape
  Dim shp as Shape, s as String
  If ActiveWindow.Selection.Shapes.Count<>1 then Exit Sub
  Set shp = ActiveWindow.Selection.Shapes.Item(1) 'or is it 0?
 
  s = "Name: " & shp.Name & vbCrLf
  s = s & "NameU: " & shp.NameU & vbCrLf
  s = s & "NameID: " & shp.NameID & vbCrLf
  s = s & "ID: " & shp.ID & vbCrLf

  Msgbox s
End Sub

Sub PageCheck()
  Dim pg as Page, s as String
  Set pg = ActivePage
 
  s = "PageName: " & pg.Name & vbCrLf
  s = s & "PageNameU: " & pg.NameU & vbCrLf
  s = s & "ID: " & pg.ID & vbCrLf

  Msgbox s
End Sub


Afaik NameID and NameU should work in the ShapeSheet!

-----------------

If you rename a shape or a page the first time: both Name and NameU change to the new value.
If you rename it a second time, only Name will change and you have Name<>NameU.


ab8421

With the UName it does what I thought it should.

Is there any easyway like right click to figure out the UName?


Thanks a lot for your fast replies

Jumpy

I always thought the name displayed in the ShapeSheet, or the name displayed in the drawing explorer is the NameU. Seems like that is wrong???