Description Sets the string name of a specific keyword node.
Syntax kwRet = KeywordSetName( kwNode, kwName )
Parameters kwRet (Long) Returned value indicating success or failure of setting the description. If the operation is successful, the returned value is the same as kwNode.
kwNode As Long Node number of the keyword being modified.
kwName As String Name string being applied to the keyword.
Example The example below loops over each keyword and performs a name comparison against a search string. If a match is found in the comparison, the keyword is renamed.
Sub Main
ClearOutputWindow()
'Get the count of existing keywords Dim kwCount As Long kwCount = KeywordCount()
'Name we are comparing against Dim searchName As String searchName = "Black Paint"
'Loop over each keyword and perform a name comparison Dim curKw As Long Dim kwName As String For curKw = 0 To kwCount-1 kwName = KeywordGetName( curKw ) If kwName = searchName Then KeywordSetName( curKw, "Blackened Surface Treatment" ) End If Next
End Sub
See Also
|