LinkedStatus Method

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 17:08

Description

Returns the node's linked/linkable status.

Available in Ted and in Fredl.

Syntax

dim iLinkedStatus as Integer = object.LinkedStatus

object

Required. Object name. Returned by the GetRootNode, GetCurNode, GetTxtNode, GetParent, GetChild functions of the object, returned by Ted.GetActiveArticle.

Return value

0        if the node is not a text node

1        if the text can be linked to a page but it is not linked in the current region

2        if the text is linked or references a pag'd picture (in the current region)

3        if the node text cannot be linked to a page (due to its type link attribute)

Example

The following script deletes linkable, but not yet linked texts (in the current region) in the current article  - ie 'sync' the article content with the page:

    If Ted.HasActiveArticle Then

      Dim objA = Ted.GetActiveArticle

      Dim bChecked As Boolean = objA.IsChecked

      Dim bOrgChecked As Boolean = bChecked

      For i = objA.NTxts - 1 To 0 Step -1

        Dim objN = objA.GetTxtNode(i)

        If objN.LinkedStatus = 1 Then

          If Not bChecked Then

             objA.ToggleCheck(1)

             bChecked = True

          End If

           Fred.AppSetMsgDisplay(False)

           objA.DelTxt(i, True, False)

           Fred.AppSetMsgDisplay(True)

        End If

      Next

      If bChecked And Not bOrgChecked Then

         objA.ToggleCheck(0)

      End If

    End If

Context

Node object