Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to find indexes of nodes connected by a link (Read 1763 times)
lyrock
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Sep 12th, 2011
How to find indexes of nodes connected by a link
Dec 8th, 2011 at 6:50am
Print Post  
the codes are like following. Thanks


Dim link As DiagramLink
Dim numLink As Integer = view.Diagram.Links.Count

For j As Integer = 0 To numLink - 1
link = view.Diagram.Links(j)

int StartIndex = StartNode's index of the link (?)
int EndIndex = EndNode's index of the link (?)

Next
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How to find indexes of nodes connected by a li
Reply #1 - Dec 8th, 2011 at 8:30am
Print Post  
You can get references to the nodes that a link connects using the Origin and Destination properties of the DiagramLink class. I'm not sure what kind of indices you need to find. If it's the index of a node within the diagram.Nodes collection, try this:

Code
Select All
startIndex = diagram.Nodes.IndexOf(link.Origin)
endIndex = diagram.Nodes.IndexOf(link.Destination) 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
lyrock
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Sep 12th, 2011
Re: How to find indexes of nodes connected by a li
Reply #2 - Dec 8th, 2011 at 2:31pm
Print Post  
Thank you.
This is exactly what I want.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint