Link data to page

Started by visio, February 09, 2011, 11:11:42 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

visio

Trying to link data from excel to a page in an multi page visio diagram. The data is used as an anchor for placement of smartshapes on the same page. The shapes being able to reference this by the page's Shape Data property, Prop.StartDate, example formula below.

GUARD(ThePage!Prop.StartHeight+(ThePage!Prop.StartTime-(Prop.Start_time-ThePage!Prop.StartDate))*ThePage!Prop.Scale)


The data is very simple (see  example below)

Start             Date
StartDate       08/02/2011

An existing sheet in the visio diagram does have a link to the data, however I have been unable to add another link to a page (can link to a shape no problem) or copy the page with this link.

Any ideas. Difficult to find info on this because as soon as link is mentioned in a search the seach comes back with hyperlink.


Jumpy

Quote from: visio on February 09, 2011, 11:11:42 AM
An existing sheet in the visio diagram does have a link to the data, however I have been unable to add another link to a page (can link to a shape no problem) or copy the page with this link.

How did you do this? I didn't know, that it is possible to link pages to External Data (although they have a ShapeSheet). I always thought you could only link Shapes to External Data.

Nikolay

Hi Jumpy,

You could establish this linkage programmatically like this (1,1 are the recordset id and the row id):

ActivePage.PageSheet.LinkToData 1, 1, False


Not sure if it is legal, but it appears to work :)
I think this is actually unrelated to the initial question, but I did not get the initial question at all

Jumpy

I thought it meant to link the page to another (second or more) datasource.

Don't know, if it is even possible to link a shape to more than one External Data sources?

(I know there can exists more than one external datasource in a document/drawing).

visio

It was linking a page to an external data source.

Used this to link the top of a page to a time and date so it could be used to position shapes on the page wrt time for a batch run (a scale for the page for correct placement of shapes automatically). As the date changed every day wanted to make this dynamic.

When right clicking the data source to show linked shapes it is linked to 'the page <page name>' 

Managed to do this and can be seen in the shapesheet (under the ShapeData field for the page) though can't remember how and want to do it again.

Visio version is 2007 professional.

visio

Managed to do a workaround.

As already have a page linked to external data all that was required was to link the new page to the existing page. Working out the reference was not straightforward but the solution is below. Just put this in as the formula for the property required on the new page. In this case it was the StartDate

=Pages[<Existing_page_name>]!ThePage!Prop.<property_required>

If the existing page is called Fred and property is the StartDate of Fred then the command becomes

=Pages[Fred]!ThePage!Prop.StartDate