Filtered segments counts ?

I am trying to write a brief PlugIn

 

It counts segments from filtered result

It works like hu(wo)man (I mean slow), selects all the segments using leftmost seg numbers and counts it.

But, I'd like to improve its working speed.

 

So...

I used default 'Display Filter' to make a good result.

-in screenshot its result shows 4 segments

 

Now, when I run 'Advanced Display Filter', it shows another nice figure.

-in screenshot it reveals 'Filtered 4 of 27 segments' . I like very much this part.

 

But, when I run 'Community Advanced Display Filter', it lacks this message. Just empty.

 

Screenshot of Trados Studio with a Display Filter applied showing 4 segments in the results pane.

 

Is there any way to use this figures ?

If possible, I'd like to know the list of filtered segments too.

 

Thanks 



Generated Image Alt-Text
[edited by: Trados AI at 1:10 PM (GMT 0) on 5 Mar 2024]
Parents
  • I am not sure I fully understand this.

    If I use the Community Advanced Display Filter and apply a filter, I can see these figures:

    Community Advanced Display Filter window showing 'Apply Filter' and 'Clear' buttons, with 'Status: Not Translated' filter applied, displaying 'Filtered 60 of 69 segments'.

    Now, if I open both the Community and the "normal" Advanced display filter, and I set a filter in the normal one, the filtered number does not update in the ACDF status bar. But then I cannot imagine a scenario where one would need both filter dialogs.

    Do you need both filters and is this effect the one you describe or do you mean something else entirely?



    Edit: To get the number of filtered segments, you can use ActiveDocument.FilteredSegmentPairsCount.ToString();



    Generated Image Alt-Text
    [edited by: Trados AI at 1:10 PM (GMT 0) on 5 Mar 2024]
Reply
  • I am not sure I fully understand this.

    If I use the Community Advanced Display Filter and apply a filter, I can see these figures:

    Community Advanced Display Filter window showing 'Apply Filter' and 'Clear' buttons, with 'Status: Not Translated' filter applied, displaying 'Filtered 60 of 69 segments'.

    Now, if I open both the Community and the "normal" Advanced display filter, and I set a filter in the normal one, the filtered number does not update in the ACDF status bar. But then I cannot imagine a scenario where one would need both filter dialogs.

    Do you need both filters and is this effect the one you describe or do you mean something else entirely?



    Edit: To get the number of filtered segments, you can use ActiveDocument.FilteredSegmentPairsCount.ToString();



    Generated Image Alt-Text
    [edited by: Trados AI at 1:10 PM (GMT 0) on 5 Mar 2024]
Children