Re: enumerate custom properties



Hello Travis,

Here's a VBA example for you:

Sub GetCustomProperties()
Dim shp As Visio.Shape
Dim i As Integer

Set shp = ActiveWindow.Selection.PrimaryItem
If Not shp Is Nothing Then
If shp.SectionExists(visSectionProp, 0) = True Then
For i = 0 To shp.RowCount(visSectionProp) - 1
Debug.Print shp.Section(visSectionProp).Row(i).NameU
Next i
End If
End If

End Sub

Hope that helps.

Best regards

John


John Goldsmith
www.visualSignals.co.uk

"travis_" <travis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:040DC75C-66B8-4439-A6CE-4E3E3CBF3773@xxxxxxxxxxxxxxxx
Is there a simple way to enumerate the custom properties of a shape?

// something this would be perfect (if it worked)
foreach (Visio.Cell cell in shape.Cells) {}

There must be a way since the shape*** is able to do this. I also
looked
into enumerating sections (to then enumerate the Shape Data section)
without
success.

Apologies if this is answered elsewhere.




.


Loading