Inventor iLogic rule stop by itself if processing longer than given time?

Inventor iLogic rule stop by itself if processing longer than given time?

Maxim-CADman77
Advisor Advisor
443 Views
2 Replies
Message 1 of 3

Inventor iLogic rule stop by itself if processing longer than given time?

Maxim-CADman77
Advisor
Advisor

Moved from older thread for clarity: iLogic: measure time elapsed during run rule

 

I wonder if it possible to have iLogic rule stop by itself if its processing lasts longer than some given period?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
444 Views
2 Replies
Replies (2)
Message 2 of 3

AlexFielder
Advisor
Advisor

This would do it:

(Based on the variables in the page you linked to)

 

'Pseudo-code:
If ts > value then
exit sub
end if

Simples. Smiley Wink

0 Likes
Message 3 of 3

AlexFielder
Advisor
Advisor

Or to take a specific (c#) example of my own:

 

if (sw.Elapsed > TimeSpan.FromSeconds((double)usedRange.Rows.Count / 2)) //a rough calculation based on Excel's processing speed.
            {
                Reporter.UpdateStatusBar("Processing is taking longer than expected... (processed: " + numrows + " in: " + sw.Elapsed.Seconds.ToString() + ") seconds");
            }
0 Likes