Navigation: Scripting Reference Manual > Functions & Subroutines > KeywordAdd

 

KeywordAdd

 

Contact Us: fredsupport@photonengr.com

 

Description

Returns the node number of a newly added keyword having the given name and description strings.  No check is made to see if the name provided is already being used by an existing keyword.

 

 

Syntax

kw = KeywordAdd( kwName, kwDesc )

 

 

Parameters

kw (Long)

Returned node number of the newly added keyword.

 

kwName As String

String name of the keyword being added.

 

kwDesc As String

String description of the keyword being added.

 

 

Example

The following script checks for the existence of a keyword with a given name and either retrieves the node number of the existing keyword or creates a new keyword node.

 

Sub Main

 

    Dim kw As Long

    Dim kwName As String, kwDesc As String

    kwName = "Painted"

    kwDesc = ""

    kw = KeywordFind( kwName )

    If kw < 0 Then

        kw = KeywordAdd( kwName, kwDesc )

    End If

 

End Sub

 

See Also

Keyword Scripting Commands

 

 

 

 

 

Copyright © Photon Engineering, LLC