Author Topic: Access Shape Data across master shapes  (Read 2159 times)

0 Members and 1 Guest are viewing this topic.

Another_Noone

  • Guest
Access Shape Data across master shapes
« on: February 27, 2017, 06:29:28 AM »
Hi,
my problem is:

I have 2 MasterShapes.
I need to Access the Shape Data of one MasterShape from a Shape within the other MasterShape.
I tried using
Masters[Legende]!Sheet.55!Prop.size (Legende is the masterShape wich contains the data i need, its on Sheet 55 and called size)
It seems to work (Auto completion shows the prop.size, but as soon as i enter,
it says i have a formula error in this block.
So,
1. where is my mistake
2. Or is there an easier way to get the shape data for my formula
?
Thx in advance

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #1 on: February 27, 2017, 06:42:56 AM »
IMHO: References like Masters[Legende] impossible in Visio

Another_Noone

  • Guest
Re: Access Shape Data across master shapes
« Reply #2 on: February 27, 2017, 06:44:41 AM »
IMHO: References like Masters[Legende] impossible in Visio
Are you sure?
If yes, is there another way to access the data?

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #3 on: February 27, 2017, 06:47:32 AM »
Are you sure?
Yes!
is there another way to access the data?
Which data you need ? And what kind of access ?

Another_Noone

  • Guest
Re: Access Shape Data across master shapes
« Reply #4 on: February 27, 2017, 06:49:57 AM »
Which data you need ? And what kind of access ?
The Mastershape has a ShapeData called size (a number), wich i need to include in a formula within a shapedata for another shape (in another mastershape!)

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #5 on: February 27, 2017, 06:54:34 AM »
IMHO The best wai is use TheDoc cells for that task

Another_Noone

  • Guest
Re: Access Shape Data across master shapes
« Reply #6 on: February 27, 2017, 06:58:39 AM »
use TheDoc cells
How exactly would I do that, Im not that experienced.

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #7 on: February 27, 2017, 07:05:50 AM »
1. add user-defined cell in TheDoc, for example user.size
2.in another master add user-defined cell with formula
Code
SETF(GetRef(TheDoc!User.size),sheet.55!Prop.size)
3. in target shape you can use reference: TheDoc!user.size

Another_Noone

  • Guest
Re: Access Shape Data across master shapes
« Reply #8 on: February 27, 2017, 07:12:58 AM »

Code
SETF(GetRef(TheDoc!User.size),sheet.55!Prop.size)


Answer from Visio is:
Mistake in formula

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #9 on: February 27, 2017, 08:40:52 AM »
can you attach there vsd-file with simple example

Another_Noone

  • Guest
Re: Access Shape Data across master shapes
« Reply #10 on: February 27, 2017, 09:23:17 AM »
I just figured it out, thank you.
My mistake was, i put the user.size cell into the Pages ShapeSheet, and not the documents.
Now it works, like its supposed to.

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: Access Shape Data across master shapes
« Reply #11 on: February 27, 2017, 10:07:14 AM »
I was wrong !
IMHO: References like Masters[Legende] impossible in Visio
Quote from: M$FT Dev Center article About Cell References
To reference a cell ofUse this syntaxExample
The same shapeCellNameWidth
A shape, group, or guideShapename!CellNameStar!Angle
A shape, group, or guide in which more than one shape at the same   
level has the same name
Shapename.ID!CellNameExecutive.2!Height
A named column with indexed rowsSection.Column[index]Char.Font[3]
An unnamed column with indexed rowsSection.ColumnIndexScratch.A5
Any shape, page, master, or styleSheet.ID!CellNameSheet.8!FillForegnd
A masterMasters[MasterName]!SheetName!CellReference          Masters[Gear]!Shaft!Geometry1.X1
The page or master page on which the object is locatedThePage!CellReferenceThePage!User.Vanishing_Point
Another page in the documentPages[PageName]!SheetName!CellReferencePages[Page-3]!Sheet.4!BeginX
A styleStyles!SheetName!CellReferenceStyles!Manager!LineColor
The DocumentTheDoc!CellReferenceTheDoc!PreviewQuality
A shape, page, master, document, or style with a nonstandard name.     'Sheetname'!CellName'1-D'!LineColor
« Last Edit: February 27, 2017, 10:23:49 AM by Surrogate »