Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) Flowchart from a XML doc (Read 10569 times)
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Flowchart from a XML doc
Oct 7th, 2008 at 9:31am
Print Post  
HI all,
I want to show a flow chart at the run time, the flow should be taken from a XML file and then represent it in a flow diagram. Can any1 suggest me how to do this, or any tool available????

An early reply will be solicited.

Thanks in advance
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Flowchart from a XML doc
Reply #1 - Oct 7th, 2008 at 9:54am
Print Post  
If I'm not wrong, you can use the LoadFromXml method of FlowChart object. Ovviously the XML file should respect the FlowchartX XML format (you can get a sample using the SaveToXml method on a existing chart).

Surely Stoyan can help you better than me Smiley
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #2 - Oct 7th, 2008 at 10:03am
Print Post  
Can u provide some source code related to this. And throw some more light on this.

Thanks
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Flowchart from a XML doc
Reply #3 - Oct 7th, 2008 at 10:14am
Print Post  
I assume you have on a form a FlowChart control and two buttons: "Load" and "Save"

Naming convention:

Form --> Form_Main
Flowchart control --> FlowChartMain
Load Button --> btnLoad
Save Button --> btnSave

(I'll use Delphi sintax that is more familiar to me, you can adapt this to your language)

after running the form you have to draw some boxes and arrows. Then you push on "Save" Button that will have the following code:
Code
Select All
procedure TForm_Main.btnSaveClick;
begin
  FlowChartMain.SaveToXml('test.xml');
end;
 



After that you can open the "test.xml" file that will contain the XML file created by application.

You can load that file on the flowchart with load button that will contain the following code:
Code
Select All
procedure TForm_Main.btnLoadClick;
begin
  FlowChartMain.LoadFromXml('test.xml');
end;
 



As you can see it's very simple. I hope to have shown all things correctly.

Greetings
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #4 - Oct 7th, 2008 at 10:41am
Print Post  
Thanks a ton....

bt if at sum point of time, the flow changes,
then do i need to create a separate forum for that and again save it as a different XML file??
Can't i make the changes in the same XML file????
What about the Vision component in .net?? can i use it???
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Flowchart from a XML doc
Reply #5 - Oct 7th, 2008 at 10:49am
Print Post  
surely xml file can be overwritten. It's not clear to me what purpose you use the flowchartx component. If you need to track changes of a chart, you can simple change the file name for example  "record20081007_1245.xml" instead of "test.xml".

I've not experience with other components, I can't help you with .NET
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #6 - Oct 7th, 2008 at 10:57am
Print Post  
Thanks a ton for ur support
but i am doing this in ASP.net/C# only.

can i use your previous method for the same?
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Flowchart from a XML doc
Reply #7 - Oct 7th, 2008 at 11:34am
Print Post  
I think yes, but only Stoyan can answer you correctly on this Wink
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #8 - Oct 7th, 2008 at 11:49am
Print Post  
but in your method you are saving the form as XML file, and again loading it during run time.

but wt i want is this---- I will give the flow in a XML file, and flow chart should take the flow according to the inputs given in the XML file. I don't have any save or load button on the form. When ever the input will change, the flowchart will automatically change according to the XML file.

Can you help me on this??
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flowchart from a XML doc
Reply #9 - Oct 7th, 2008 at 12:52pm
Print Post  
Do you need to load XML files that conform to your own schema, or it's ok to use our diagramming xml format?
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #10 - Oct 8th, 2008 at 2:14am
Print Post  
Hi stoyo

i need to use XML files that conform to my own schema.
  
Back to top
 
IP Logged
 
Harry
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #11 - Oct 8th, 2008 at 6:11am
Print Post  
Hi Stoyan,

it will be very useful if you can provide me some sample application.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flowchart from a XML doc
Reply #12 - Oct 8th, 2008 at 9:32am
Print Post  
Here is a sample showing how to load XML files with the following format:
https://mindfusion.eu/_samples/loadxml.zip

Code
Select All
<workflow>
	<activity id="1">
		<next id="2" />
		<next id="3" />
	</activity>
	<activity id="2">
	</activity>
	<activity id="3">
	</activity>
</workflow>
 



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


I love YaBB 1G - SP1!

Posts: 11
Joined: Oct 7th, 2008
Re: Flowchart from a XML doc
Reply #13 - Oct 9th, 2008 at 4:40am
Print Post  
Thanks a ton Stoyan,
this sample app helped me a lot...  Smiley

but i m unable to use the MindFusion.Diagramming namespace. Did you use the MindFusion NetDiagram component???? Do i need to download and install this component to run the application????
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flowchart from a XML doc
Reply #14 - Oct 9th, 2008 at 7:47am
Print Post  
This sample uses the Windows Forms version:
https://www.mindfusion.eu/FCNetDemo.zip

Though the MindFusion.Diagramming namespace is the same in both the ASP.NET and Windows Forms versions - they share the MindFusion.Diagramming.dll - so you should be able to use this code with NetDiagram as well.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint