2

I'm attempting to create a custom stencil, and one of the ways I want to make developing this easier is to have children reference the dimensions of parent stencils (parametric design).

In the below pictures I'm showing the values I want to refer to on the parent, as well as confirming the Shape Name is Shape.7.

enter image description here

The Parent shape's properties

But when I attempt to refer to it on the child shape, I'm told I have an invalid formula, even though the autocompletion in Visio is listing the available fields for me which appears to confirm I'm referencing it correctly:

Screenshot of problematic formula: =Masters[BS]!Shape.7!Width

In this example stencil I have two shapes, Parent and Child. This is the stencil I used to create the screenshots above. I simply want the Child shape to inherit constant values from the Parent shape rather than copying them, so that modifying the parent would automatically update the child.

Myrddin Emrys
  • 42,126
  • 11
  • 38
  • 51
  • Can you share your document with this issue? – Surrogate May 02 '22 at 20:15
  • I can share a simplified example stencil: [Example.vssx](https://herzing-my.sharepoint.com/:u:/g/personal/memrys_herzing_edu/EbzjuMjEAolOkRo2O3M4tJcBPQdXOIV-Ec_3klgUKu31Sg?e=ic3nwG) – Myrddin Emrys May 03 '22 at 12:53
  • 1
    It looks like what you are looking for is not possible. You may get a detailed explanation (why it is impossible) or maybe some workarounds if you ask your question on a visio-specific forum: http://visguy.com/vgforum – Nikolay May 04 '22 at 20:32
  • I've managed to do this. Open the shape from the Document Stencil and look at the name of the top shape, in the case of the shape I opened it was Sheet.5. Then enter the formula as =Masters[Flip-flop]!Sheet.5!Height. – Paul Herber May 04 '22 at 21:39

1 Answers1

2

Instead of Shape.7 I think you need to use the Sheet name e.g. Sheet.5 or similar. =Masters[Flip-flop]!Sheet.5!Height

enter image description here

Paul Herber
  • 1,150
  • 1
  • 7
  • 12
  • I suspect you didn't actually open the example stencil, because the name of the sheet is `Shape.7`. – Myrddin Emrys May 05 '22 at 12:51
  • But you cannot refer to the shape within the master in that way, you have to use the Sheet.xxx format. – Paul Herber May 05 '22 at 13:59
  • I still get 'error in formula' using Sheet. Have you successfully tested it yourself? – Myrddin Emrys May 05 '22 at 14:33
  • I've updated the answer with a screenshot of the formula. – Paul Herber May 05 '22 at 17:23
  • It looks like you're modifying the shapesheet of a shape placed on a page; as I mentioned, I'm attempting to define the shape of a stencil Master. – Myrddin Emrys May 05 '22 at 17:50
  • No, I'm modifying a shape that is in the Document Stencil. That is where the Masters are. – Paul Herber May 05 '22 at 20:07
  • Is this perhaps a behavior that's different when you are working with a separate, shared stencil vs the built-in page stencil? What happens when you create a separate custom stencil (suitable for sharing with others and between documents)? Because from the screenshot you shared, it looks like you're working with a Page, not a separate Stencil. – Myrddin Emrys May 05 '22 at 21:44