Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Box information from database (Read 4524 times)
lemon
Guest


Box information from database
Aug 31st, 2005 at 5:52am
Print Post  
Hi
I would like to store all information to a box or node in a data base and then I will load the flowchart items from the data base.  How do I know the information of the points of anchor ( which node docked and where)? 

Thanks

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box information from database
Reply #1 - Aug 31st, 2005 at 7:50am
Print Post  
Hi,

You can use the box.AnchorPattern.PatternId property to get a string id of the anchor pattern and store it in the DB. Then each link has an OrgnIndex and DestIndex property that specifies to each point of the origin and destination nodes' anchor patterns the arrow's ends are docked. So you must save these indices for each arrow and later use the CreateAnchoredArrow method to restore the link from the database info.

I hope this helps.
  
Back to top
 
IP Logged
 
lemon
YaBB Newbies
*
Offline



Posts: 28
Joined: Aug 31st, 2005
Re: Box information from database
Reply #2 - Aug 31st, 2005 at 8:10am
Print Post  
I think, it must more simply go. 
the information like the parentnode is enough. I need a function, which sets an arrow automatically between parent node and child.  But which pre-defined functions I need? I dont know.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Box information from database
Reply #3 - Aug 31st, 2005 at 8:27am
Print Post  
Ok if you don't want to store the arrows points you could go like this:

- store the relations between nodes in a helper many-to-many table
- create arrows between related nodes as read from the relations table by calling CreateArrow
- at the end, use either some of the automatic layout routines to arrange the whole diagram or set all arrows Dynamic and call the RouteAllArrows method

  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint