Message 1 of 3
Problem with Prompt Keywords

Not applicable
03-09-2007
09:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I was just making a user prompt prcedure, but faced a strange problem. when I add Keywords to my prompt options, the code doesn't work at all.
This is the code:
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim prpipedata As PromptStringOptions = New PromptStringOptions("Select Property")
Dim prpipedata_res As PromptResult = Nothing
prpipedata.Keywords.Add("Label")
prpipedata.Keywords.Add("Section")
prpipedata_res = ed.GetString(prpipedata)
If prpipedata_res.Status = PromptStatus.Cancel Then
MsgBox("Error: user cancelled")
Else
MsgBox(prpipedata_res.StringResult)
End If
This code works well only when I eliminate the two lines which assign keywords to the Prompt Options, can anybody help?
I was just making a user prompt prcedure, but faced a strange problem. when I add Keywords to my prompt options, the code doesn't work at all.
This is the code:
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Dim prpipedata As PromptStringOptions = New PromptStringOptions("Select Property")
Dim prpipedata_res As PromptResult = Nothing
prpipedata.Keywords.Add("Label")
prpipedata.Keywords.Add("Section")
prpipedata_res = ed.GetString(prpipedata)
If prpipedata_res.Status = PromptStatus.Cancel Then
MsgBox("Error: user cancelled")
Else
MsgBox(prpipedata_res.StringResult)
End If
This code works well only when I eliminate the two lines which assign keywords to the Prompt Options, can anybody help?