Getting Text from a cell in Shape Data Section a shapesheet.

Started by Rich_Cohen, February 08, 2013, 05:53:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Rich_Cohen

I'm trying to parse and output data about a Business Process Modeling Notation (BPMN) diagram drawn in Visio.  Each shape has as Shape Data section and most of the values appear to be text when I look at the shape sheet.  However, when I try to access it with VB I get a numeric zero 0.  What am I doing wrong?

Here's a sample from the Immediate window:

? activepage.Shapes(29).cellsU("Prop.BpmnElementType")
0


Note that the following shows the correct text for this shape, so my mistake must be in the use of CellsU.

? activepage.Shapes(29).Text
New item
for a project

Any help would be appreciated.

Rich

Surrogate

Try add ".Formula", like as

? activepage.Shapes(29).cellsU("Prop.BpmnElementType").Formula

Jumpy

or even better could be to add .ResultStr("") instead of .Formula because the formula in many ShapeData is sth. like =Index(1,Prop.MyData.Format). And in some Visio Versions you get that formula and in some you get the result of that formula.

(There was a thread about that behaviour not long ago).

Rich_Cohen