How can I go to a segment directly ?

at Merged file like this;

I'd like to go to 2nd segment of 2nd file

Trados Studio interface showing a merged file with three parts. The first part has three segments with lyrics from 'Let it be'. The second part repeats the first segment. The third part has two new segments with lyrics.

The segment number is not unique at all

Then
How can I go to a segment directly ? Using "SetActiveSegmentPair" method of Sdl.TranslationStudioAutomation.IntegrationApi ?

Or
Any better/other coding style to achieve this goal ?

Thanks..

Let it be 3 parts.zip



Generated Image Alt-Text
[edited by: Trados AI at 1:31 PM (GMT 0) on 5 Mar 2024]
Parents
  • Ciao , have you tried the examples mentioned in the public documentation here: SetActiveSegmentPair ?

    Examples:

    SetActiveSegmentPair(ProjectFile, String, Boolean)

    Sets the active segment pair to the segment pair with the given number and sets focus on that segment if specified.

    Declaration
    public bool SetActiveSegmentPair(ProjectFile projectFile, string segmentNumber, bool setFocusOnSegment = false)


    SetActiveSegmentPair(String, String, Boolean)

    Sets the active segment pair to the segment pair with the given paragraphId and segmentNumber.

    Declaration
    public bool SetActiveSegmentPair(string paragraphId, string segmentNumber, bool setFocusOnSegment = false)
     

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group

Reply
  • Ciao , have you tried the examples mentioned in the public documentation here: SetActiveSegmentPair ?

    Examples:

    SetActiveSegmentPair(ProjectFile, String, Boolean)

    Sets the active segment pair to the segment pair with the given number and sets focus on that segment if specified.

    Declaration
    public bool SetActiveSegmentPair(ProjectFile projectFile, string segmentNumber, bool setFocusOnSegment = false)


    SetActiveSegmentPair(String, String, Boolean)

    Sets the active segment pair to the segment pair with the given paragraphId and segmentNumber.

    Declaration
    public bool SetActiveSegmentPair(string paragraphId, string segmentNumber, bool setFocusOnSegment = false)
     

    Patrick Andrew Hartnett | Developer Experience | Team Lead | RWS Group

Children