Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Progress Indicator while executing ArrangeDiagram (Read 9982 times)
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Progress Indicator while executing ArrangeDiagram
Oct 6th, 2008 at 5:24pm
Print Post  
Hi,

Since we have a flowchart with thousands of nodes and arrows and we have to execute the ArrangeDiagram method of GridLayout, it takes long long time.

We need to have a "progress indicator" of executing method (as I told you in Discussion forum), because the application becomes "freezed", better if this indicator shows the progress via Windows Messages.

Since we bought pro version with source code, there is a way to implement this ourselves?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Progress Indicator while executing ArrangeDiag
Reply #1 - Oct 7th, 2008 at 7:56am
Print Post  
Ok, we'll add some event for this in the next couple of weeks. If you can't wait, feel free to implement it yourself Wink
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #2 - Oct 7th, 2008 at 9:04am
Print Post  
surely we'll wait... meanwhile we'll implement other features needed in our software Wink

thank you very much!
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #3 - Jan 20th, 2009 at 2:47pm
Print Post  
hi,

got news for me?  Grin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Progress Indicator while executing ArrangeDiag
Reply #4 - Jan 21st, 2009 at 5:57am
Print Post  
next week perhaps 8)
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #5 - Jan 21st, 2009 at 11:45am
Print Post  
wonderful  Grin
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Progress Indicator while executing ArrangeDiag
Reply #6 - Jan 23rd, 2009 at 9:49am
Print Post  
We've added a LayoutProgress(current, total) event, raised by all layout classes. You can find the updated version on the PM page.
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #7 - Jan 26th, 2009 at 9:18am
Print Post  
Very good! I'll start to test it now  Grin
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #8 - Feb 13th, 2009 at 2:57pm
Print Post  
Unfortunately, I wasn't able to make it work.

I call the Arrangediagram method in this way:

Code
Select All
var
    gl:GridLayout;
begin

     gl := CoGridLayout.Create();
     gl.GridSize := 120;
     gl.ArrowAnchoring := ancReassign;
     gl.NumIterations := 50;
     gl.routearrows := false;

     flowChartMain.FitDocToObjects(10);
     flowChartMain.ArrangeDiagram(gl);
end;
 



and this is the procedure LayoutProgress:
Code
Select All
procedure TForm_Main.flowChartMainLayoutProgress(ASender: TObject; current,
  total: Integer);
begin
  showmessage(inttostr(current) + ' / ' + inttostr(total));
  Application.ProcessMessages;  //I don't know if this can be useful...
end;
 



I inserted a breakpoint on the first line of flowChartMainLayoutProgress but it was never hit.

Some suggestions? Thank you in advance.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Progress Indicator while executing ArrangeDiag
Reply #9 - Feb 13th, 2009 at 3:30pm
Print Post  
I am testing the event here under VB and it is working as expected. If the diagram is empty however, the event doesn't fire. Is it possible that you are running the test on an empty flowchart?

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


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #10 - Feb 13th, 2009 at 4:23pm
Print Post  
I was testing a chart with 30 boxes that were connected randomly by 300 arrows.

Since computation was a little "heavy", the event was not raised but with a chart with a larger ratio nodes/arrows it worked.

I'll keep testing if this behaviour is correct.

thank you
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #11 - Feb 16th, 2009 at 11:19am
Print Post  
Issue solved. Now I'm able to indicate a percentage (current/total*100). Thank you very much.  Grin
  
Back to top
 
IP Logged
 
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Re: Progress Indicator while executing ArrangeDiag
Reply #12 - Apr 7th, 2009 at 3:37pm
Print Post  
hi there,

I was wondering if is it possible to break the re-arrangement during the onLayoutProgress event.

This could be useful because a user could break the "ArrangeDiagram" method pressing a button while progressbar is advancing slowly...

any suggestions?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Progress Indicator while executing ArrangeDiag
Reply #13 - Apr 8th, 2009 at 7:36am
Print Post  
Hi,

It's not possible at this time.

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