Hi to all :). Thanks to this forum, I was able to make a first part of what I need (I am not a programmer, but I try to understand how far I can) and I need help with the following, which I do not know if it can be done from Shape Sheet or if it is better via code .
I have rectangles with custom cells, and they can receive one or more connections.
So my idea was that the connector receives the text I need from the output rectangle. Once with that data, the input rectangle, read the field obtained in the connection.
The problem is that a table can probably have 10 inputs, I'm only interested in the inputs.
How can I do, as for each input that receives the shape, place the FromName text of the connector, in the corresponding field Input1, Input2, Input3 (up to 10 at least they will be)
Is it feasible in any way?
Thanks in advance
Hi Guys, seeing this post http://visguy.com/vgforum/index.php?topic=8116.msg35112#msg35112 , where Wapperdude recommend some links, i can do the following
Public Sub GetIncomingShapes()
'Use Shape.ConnectedShapes to get the shapes that are incoming connections to a shape
Dim shp As Visio.Shape
Dim shpIDs() As Long
Dim i As Integer
If ActiveWindow.Selection.Count = 0 Then
MsgBox ("select a shape with connections")
Exit Sub
Else
Set shp = ActiveWindow.Selection(1)
End If
shpIDs = shp.ConnectedShapes(visConnectedShapesIncomingNodes, "")
Debug.Print "Incoming shapes"
For i = 0 To UBound(shpIDs)
Debug.Print ActivePage.Shapes.ItemFromID(shpIDs(i)).Name
Next
End Sub
In this way, debug print show me all incoming for "selected" shape.
May be exist a way to go through each shape of the active page, and, for each shape (including those in a group), retain in variables, the names of the posibles inputs and then look for the custom property of each input retained in variable, and after write it in the custom property of the shape that It is being analyzed?
Regards
Zule
-
-