Shape Text as a DataGrapic Value?
-
Tuesday, February 28, 2012 12:50 AM
Simple, Trivial Question - What's the Custom Formula in a DataGraphic Dialog to Use the Shape Text as the DG Value?
BTW, pardon my naïveté
Thanks.
Steve Mack
All Replies
-
Wednesday, February 29, 2012 5:29 AMModerator
Hi Steve Mack,
Please check this article: "Custom Formulas in Data Graphics"
http://blogs.msdn.com/b/visio/archive/2007/03/06/custom-formulas-in-data-graphics.aspxSee also:
"Building Custom Data Graphics for Visio"
http://msdn.microsoft.com/en-us/library/aa468596(v=office.12).aspx
Hope this helpful.William Zhou
TechNet Community Support
-
Wednesday, February 29, 2012 1:36 PMThanks William. But I saw that. It's helpful but doesn't answer the question. Which is, is there a Custom Formula for displaying the Shape Text (if the Shape Text is not also a Shape Data field?)
Steve Mack
-
Wednesday, February 29, 2012 2:18 PM
Hello Steve,
Have a go with:
=SHAPETEXT(TheText)
Best regardsJohn
John Goldsmith (Visio MVP) http://visualsignals.typepad.co.uk/vislog/ http://www.visualsignals.co.uk/
-
Wednesday, February 29, 2012 2:47 PM
Thanks John, but I must be missing something.
Inserting =SHAPETEXT(theText) into the Custom Formula only puts out the literal string, "SHAPETEXT(theText)" with the the DG applied.
The Intellisense prompt when accessing the function is SHAPETEXT(sheetN!theText, flags_opt). I don't want to pass a literal string to the function, but rather it's Shape reference, right? Like in a VBA Form with a self-reference, something akin to a notional "Me.Text", e.g. "SHAPETEXT(Me.Text)" which would put out the actual text value with the DG.
So how to tell Visio to actually use the function? Or any function for that matter?
But no big deal because I can put the Shape Text into a Shape Data field as a work around and apply the DG that way.
Incidentally, since the Shape Text value is not explicitly available as a cell in the Shape Sheet, is there a way to refer to it's value in other Shape Sheet cells?
Steve Mack
-
Wednesday, February 29, 2012 4:38 PM
Hello Steve,
Well that's the purpose of the function - to return the shape's text. It works ok for me. Have a look at the screenshot below and see if we differ in some way:
Ordinarily I would put data in the Shape Data cells and then use an inserted field to reference the Shape Data, but it depends on how you want users to interact with the shape.
Best regards
John
John Goldsmith (Visio MVP) http://visualsignals.typepad.co.uk/vislog/ http://www.visualsignals.co.uk/
- Marked As Answer by Stephen Mack Wednesday, February 29, 2012 5:00 PM
-
Wednesday, February 29, 2012 5:00 PM
Thanks again John. That works.
I have to play around with this for sure...
Steve Mack
-
Wednesday, February 29, 2012 5:22 PMGreat. Glad that's working for you Steve.
John Goldsmith (Visio MVP) http://visualsignals.typepad.co.uk/vislog/ http://www.visualsignals.co.uk/

