Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Export to DB (Read 1750 times)
rad1
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 14
Joined: Aug 24th, 2009
Export to DB
Aug 24th, 2009 at 8:17am
Print Post  
hello,

I'm new at the forum, and I thank you for great work you're doing .

I test FlowChartX ActiveX. I want to know if it's possible to export diagram (example : workflow process) into a data base, or to simple format like dot script ?

Thank you for help.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Export to DB
Reply #1 - Aug 24th, 2009 at 10:25am
Print Post  
Hi,

You could save the whole flowchart as a string in a TEXT/BLOB field. Use the SaveToString and LoadFromString methods to implement that.

If you need to map flowchart items and relations to entities in your database tables, you can do that by looping over the Boxes and Arrows collections and creating records in the respective tables. I have found the following code in our support archive that loads a flowchart from a table, and saving the flowchart should be symmetrical to that:

Code
Select All
Private Sub Form_Load()
	Dim conn As New ADODB.Connection
	Dim nodeData As New ADODB.Recordset
	Dim linkData As New ADODB.Recordset

	conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;data source=D:\Projects\FlowChartX\Support\Database\test.mdb"
	nodeData.Open "select * from Nodes", conn
	linkData.Open "select * from Links", conn

	While Not nodeData.EOF
		Dim b As box
		Set b = fcx.CreateBox(0, 0, 50, 30)
		b.Tag = nodeData(0)
		b.Text = nodeData(1)

		nodeData.MoveNext
	Wend

	While Not linkData.EOF
		Dim a As arrow
		Set a = fcx.CreateArrow( _
			fcx.FindBox(linkData(1)), _
		fcx.FindBox(linkData(2)))
		a.Text = linkData(3)

		linkData.MoveNext
	Wend

	Dim sl As New SpringLayout
	sl.NodeDistance = 150
	fcx.ArrangeDiagram sl
End Sub
 



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


I love YaBB 1G - SP1!

Posts: 14
Joined: Aug 24th, 2009
Re: Export to DB
Reply #2 - Aug 25th, 2009 at 3:16pm
Print Post  
Hi,

Thank you for reply Wink
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint