D
Dennis G
I am trying to populate some of the custom properties of all the shapes on
a layer through a loop. The shapes are telecom shapes and I have modified
their shapesheets so the text fields will resize automatically. Each shapes
text field will represent a wiring closet number, a patch panel in the WC
and the port number of the patch panel where the data port is terminated.
For ex: 23:B:01 would indicate the port is terminated at Port 1 of Patch
Panel B in wiring closet 23.
I can write the VB end to get the loop to parse the text. I need to
determine where to access the Visio properties to deliver the text to the
custom props fields.
Here's the code from a test form I have created using a button to execute a
macro. I am getting undeclared object errors:
Private Sub CommandButton1_Click()
Dim page As Visio.page
Dim shp As Visio.Shape
Dim shps As Visio.Shapes
Dim Layer As Visio.Layer
Dim C As Integer
Set page = ActivePage
For Each shp In page.Shapes
For C = 1 To shp.LayerCount
If shp.Layer(C) = "PORT" Then
shp.Layer(C).Cells(prop.Prop1.Value) = "test"
End If
Next C
Next
End Sub
Thanks for any help,
Dennis
a layer through a loop. The shapes are telecom shapes and I have modified
their shapesheets so the text fields will resize automatically. Each shapes
text field will represent a wiring closet number, a patch panel in the WC
and the port number of the patch panel where the data port is terminated.
For ex: 23:B:01 would indicate the port is terminated at Port 1 of Patch
Panel B in wiring closet 23.
I can write the VB end to get the loop to parse the text. I need to
determine where to access the Visio properties to deliver the text to the
custom props fields.
Here's the code from a test form I have created using a button to execute a
macro. I am getting undeclared object errors:
Private Sub CommandButton1_Click()
Dim page As Visio.page
Dim shp As Visio.Shape
Dim shps As Visio.Shapes
Dim Layer As Visio.Layer
Dim C As Integer
Set page = ActivePage
For Each shp In page.Shapes
For C = 1 To shp.LayerCount
If shp.Layer(C) = "PORT" Then
shp.Layer(C).Cells(prop.Prop1.Value) = "test"
End If
Next C
Next
End Sub
Thanks for any help,
Dennis