Sorry, Matus
I have disagreed completely
You didn't understand how to use the function I posted
Please, try complete solution:
<CommandMethod("MatusBrilt", "matus", CommandFlags.Modal)> _
Public Sub SampleTest()
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim kwords As String() = {"Rectangle", "Circle", "Ellipse", "Squiggle"}
Dim strout As String = GetKwordOut(ed, vbLf + "Choose a Shape Type or Enter Another Type You Want: ", kwords)
ed.WriteMessage(vbLf + "{0}", strout)
End Sub
Public Shared Function GetKwordOut(ByVal ed As Editor, ByVal msg As String, ByVal kwords As String()) As String
Dim pko As New PromptKeywordOptions(vbLf + msg)
pko.AllowNone = True
pko.AllowArbitraryInput = True
For Each itm As String In kwords
pko.Keywords.Add(itm)
Next
pko.Keywords.Default = kwords.GetValue(kwords.Length - 1).ToString()
Dim pkr As PromptResult = ed.GetKeywords(pko)
If pkr.Status <> PromptStatus.OK Then
Return String.Empty
Else
Return pkr.StringResult
End If
End Function
~'J'~
_____________________________________
C6309D9E0751D165D0934D0621DFF27919