Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Get Node and the connected Node (Read 1339 times)
mohamed
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 4
Joined: Jul 17th, 2018
Get Node and the connected Node
Sep 9th, 2018 at 11:05am
Print Post  
Hi
How to get specified Node And get the other Node connected to it and display the in new diagram
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Get Node and the connected Node
Reply #1 - Sep 10th, 2018 at 10:26am
Print Post  
Hi,

If you need to do that on server side, you could query the diagram.Nodes collection using Linq by whatever criteria you want to apply. Then you can follow node's links to find respective origin and destination nodes -

Code
Select All
var node = diagram.Nodes.Where(...).FirstOrDefault();

foreach (var outLink in node.GetAllOutgoingLinks())
	Debug.WriteLine(outLink.Destination.Id);
foreach (var inLink in node.GetAllIncomingLinks())
	Debug.WriteLine(inLink.Origin.Id); 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint