CursorAtOverset Script

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:03

Description

Moves the cursor on the overset line in the current text.

This works only for texts, linked to a geometry.

Syntax

CursorAtOverset

Code

  <ShellCommand(CanExecute:="Ena_IsEditingText")> _

  Public Sub CursorAtOverset()

    Dim over As Long = Ted.GetTextOverN

    Dim lg As Long

    If over > 0 Then

      Text.CursorEndText()

      Text.CursorStartLine()

      For j = 1 To over

        Text.CursorLineUp()

        Text.CursorStartLine()

        Text.EditBlockStart()

        Text.CursorEndLine()

        Text.EditBlockEnd()

        lg = Len(Text.GetTxt)

        If lg = 0 Then j = j - 1

        Text.CursorStartLine()

      Next

      Text.CursorStartLine()

    End If

 

  End Sub