S
sbenoist
Hi,
I had a nice little tool to decorate shapes based on custom properties,
storing the data in excel, etc etc. It was working fine with Visio 5,
but after upgrading
to Visio 2002, everything is broken
Here is a code snippet of what I had to export some shapes to Excel.
For i = 1 To myPage.Shapes.Count
Set sh = myPage.Shapes(i)
With myPage.Shapes(i)
If .CellExists("Prop.SystemID", 0) Then
sysRowChar = LTrim(Str(sysRow))
For Each prop In sysProps
Call ExportProperty(prop, sysRowChar,
myPage.Shapes(i), ss)
Next prop
sysRow = sysRow + 1
End If
If .CellExists("Prop.From", 0) Then
linksRowChar = LTrim(Str(linksRow))
For Each prop In linksProps
Call ExportProperty(prop, linksRowChar,
myPage.Shapes(i), ls)
Next prop
linksRow = linksRow + 1
End If
End With
Next
The problem is that in Visio 5, the test for .CellExists was working.
Now, it is
totally impossible to access any of the custom properties added from
Visio 2002 into a shape. My old diagrams (Visio 5) still work fine, but
I cannot add / modify / remove any custom property. I suspected a
version problem between Visio 5 and visio 2002 shapes, so I started
from scratch in Visio 2002 with clean shapes, defined a custom property
set, applied it to some shapes, and... nothing. The good old way to
access custom properties with .Cells("Prop.myCustomProperty") seems to
be broken. Custom properties do not appear anywhere in the debugger so
I am completely lost
Any ideas ?
-s
I had a nice little tool to decorate shapes based on custom properties,
storing the data in excel, etc etc. It was working fine with Visio 5,
but after upgrading
to Visio 2002, everything is broken
Here is a code snippet of what I had to export some shapes to Excel.
For i = 1 To myPage.Shapes.Count
Set sh = myPage.Shapes(i)
With myPage.Shapes(i)
If .CellExists("Prop.SystemID", 0) Then
sysRowChar = LTrim(Str(sysRow))
For Each prop In sysProps
Call ExportProperty(prop, sysRowChar,
myPage.Shapes(i), ss)
Next prop
sysRow = sysRow + 1
End If
If .CellExists("Prop.From", 0) Then
linksRowChar = LTrim(Str(linksRow))
For Each prop In linksProps
Call ExportProperty(prop, linksRowChar,
myPage.Shapes(i), ls)
Next prop
linksRow = linksRow + 1
End If
End With
Next
The problem is that in Visio 5, the test for .CellExists was working.
Now, it is
totally impossible to access any of the custom properties added from
Visio 2002 into a shape. My old diagrams (Visio 5) still work fine, but
I cannot add / modify / remove any custom property. I suspected a
version problem between Visio 5 and visio 2002 shapes, so I started
from scratch in Visio 2002 with clean shapes, defined a custom property
set, applied it to some shapes, and... nothing. The good old way to
access custom properties with .Cells("Prop.myCustomProperty") seems to
be broken. Custom properties do not appear anywhere in the debugger so
I am completely lost
Any ideas ?
-s