Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Set diagramm position (Read 4307 times)
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Set diagramm position
Sep 11th, 2018 at 3:47pm
Print Post  
Helo!

How can I move given diagram to the position I need as it did for a node - node.Move(x, y)?

For example, I need to place three different diagrams one after another

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Set diagramm position
Reply #1 - Sep 11th, 2018 at 4:17pm
Print Post  
Hi,

These are sub-graphs in same Diagram instance, right? If you don't mind changing items' Selected value temporarily, you could use this method to move whole selection of items -

https://mindfusion.eu/Forum/YaBB.pl?num=1227100075/1#1

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #2 - Sep 12th, 2018 at 12:16pm
Print Post  
Thanks a lot  Smiley
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #3 - Sep 14th, 2018 at 1:49pm
Print Post  
New question, how to connect node TO2 to TO3 and TO4 to TO5? I know how to delete connection, but I don't know how to create it. When I use
Code
Select All
Diagram1.Factory.CreateDiagramLink(TO2, TO3) 

it has no effect. Maybe I forgot to use some code?

Please help me
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Set diagramm position
Reply #4 - Sep 14th, 2018 at 2:46pm
Print Post  
Have you added TO2 and TO3 to the diagram before calling CreateDiagramLink?
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #5 - Sep 14th, 2018 at 2:53pm
Print Post  
Yes
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Set diagramm position
Reply #6 - Sep 14th, 2018 at 3:00pm
Print Post  
Does CreateDiagramLink return null?
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #7 - Sep 14th, 2018 at 3:11pm
Print Post  
No. The link that was returned is not null. But Diagram1.Links.Count before creating the link and after that remained the same. And a view of Diagram was not changed
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Set diagramm position
Reply #8 - Sep 14th, 2018 at 5:37pm
Print Post  
This will happen only if origin or destination nodes are not found in diagram.Items at the time when you call CreateDiagramLink. If you believe otherwise, please attach test project demonstrating that.

Btw. if you set diagram.ValidityChecks to false, the link will be added even if the nodes are missing.
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #9 - Sep 17th, 2018 at 12:34pm
Print Post  
You're right. The destination node was not found.
Another question - what is the right way to disconnect two nodes? I have to remove link from the diagram.Links, or I have to remove it from both nodes too?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Set diagramm position
Reply #10 - Sep 18th, 2018 at 4:37am
Print Post  
Removing only from diagram.Links should be enough.
  
Back to top
 
IP Logged
 
Olejan
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 12
Joined: Apr 5th, 2016
Re: Set diagramm position
Reply #11 - Sep 18th, 2018 at 3:11pm
Print Post  
Thank you very much for your help!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint