Hello Scott,
What is VisSectionIndices.visSectionProp, and how do I get it ?
What is _index ?
That's a constant which specifies the index of the Custom Properties
Section. And I guess that this is the problem of your code.
I am using the C++ wrapper classes and have tried the following, but it
isn't getting me anything that looks like my Custom Properties.
Well, I am using the Microsoft Office Interop Assembly
(Microsoft.Office.Interop.Visio).
The constant mentioned above is available when including the assembly.
Our wrappers seem to have slightly different interfaces. Here is the C#
method for getting a cell value, to be invoked on a shape:
get_CellSRC( short section, short row, short column ).
Looking at your method call (where you obviously get the result as out
parameter), I guess the problem is that you don't use Visio's predefined
constants for addressing sections, rows, and columns. Instead, you iterate
through the rows and columns, using values from 1 .. n.
Example:
Adressing a section:
- VisSectionIndices.visSectionProp (for addressing the custom properties
section)
Addressing a column inside a section:
- VisCellIndices.visCustPropsValue (for addressing the "Value" column of the
CP section)
- VisCellIndices.visCustPropsLabel (for addressing the "Label" column of the
CP section)
(Note that every section has different column constants. This becomes clear
when looking into the shapesheet.)
Addressing a row inside a section:
- VisRowIndices.visRowProp + _index (where _index is a counter for iterating
through the rows)
I don't know the concrete names of these constants in your wrapper version,
but they should be somewhere.
Hope this information helps.
Best regards,
Markus