<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Keywords and GetSelection in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623564#M81939</link>
    <description>Isn't it possible to use Keywords with GetSelection.&lt;BR /&gt;
&lt;BR /&gt;
I tried following code but could not see the keywords.&lt;BR /&gt;
&lt;BR /&gt;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionOptions BlockOptionPick = new PromptSelectionOptions();&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Add("Name");&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Add("Liste");&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Default = "Name";&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.SingleOnly = true;&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.MessageForAdding = "Referenzblock zeigen";&lt;BR /&gt;
&lt;BR /&gt;
TypedValue[] filList = new TypedValue[1];&lt;BR /&gt;
&lt;BR /&gt;
filList[0] = new TypedValue((int)DxfCode.Start, "INSERT");&lt;BR /&gt;
&lt;BR /&gt;
SelectionFilter filter = new SelectionFilter(filList);&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionResult BlockResultPick = null;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
BlockResultPick = ed.GetSelection(BlockOptionPick, filter);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Roland Feletic</description>
    <pubDate>Tue, 25 Apr 2006 13:40:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-04-25T13:40:38Z</dc:date>
    <item>
      <title>Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623564#M81939</link>
      <description>Isn't it possible to use Keywords with GetSelection.&lt;BR /&gt;
&lt;BR /&gt;
I tried following code but could not see the keywords.&lt;BR /&gt;
&lt;BR /&gt;
Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionOptions BlockOptionPick = new PromptSelectionOptions();&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Add("Name");&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Add("Liste");&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.Keywords.Default = "Name";&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.SingleOnly = true;&lt;BR /&gt;
&lt;BR /&gt;
BlockOptionPick.MessageForAdding = "Referenzblock zeigen";&lt;BR /&gt;
&lt;BR /&gt;
TypedValue[] filList = new TypedValue[1];&lt;BR /&gt;
&lt;BR /&gt;
filList[0] = new TypedValue((int)DxfCode.Start, "INSERT");&lt;BR /&gt;
&lt;BR /&gt;
SelectionFilter filter = new SelectionFilter(filList);&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionResult BlockResultPick = null;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
BlockResultPick = ed.GetSelection(BlockOptionPick, filter);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Roland Feletic</description>
      <pubDate>Tue, 25 Apr 2006 13:40:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623564#M81939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-04-25T13:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623565#M81940</link>
      <description>I'm having the same trouble.  Anyone know what's going on?</description>
      <pubDate>Tue, 16 Jan 2007 23:49:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623565#M81940</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-01-16T23:49:22Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623566#M81941</link>
      <description>Has anyone been able to get keywords to work with GetSelection?  Is it broken?</description>
      <pubDate>Sun, 25 Feb 2007 22:28:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623566#M81941</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2007-02-25T22:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623567#M81942</link>
      <description>Post your code that isn't working.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;SINC&gt; wrote in message news:5499514@discussion.autodesk.com...&lt;BR /&gt;
Has anyone been able to get keywords to work with GetSelection?  Is it broken?&lt;/SINC&gt;</description>
      <pubDate>Mon, 26 Feb 2007 03:16:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623567#M81942</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-26T03:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623568#M81943</link>
      <description>Are you saying that you've successfully gotten Keywords to work with the PromptSelectionObjects method?&lt;BR /&gt;
&lt;BR /&gt;
There is already code posted in this thread that is not substantially different than what I've tried.  I've also tried using the SetKeywords method, also with no effect.  But if you can point out what's wrong with the code that's already posted, that would answer the question.&lt;BR /&gt;
&lt;BR /&gt;
I can use Keywords with every other kind of prompt, just not the "Select Objects" prompt.</description>
      <pubDate>Tue, 27 Feb 2007 01:13:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623568#M81943</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2007-02-27T01:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623569#M81944</link>
      <description>See the KeywordInput event of the &lt;BR /&gt;
PromptSelectionOptions class.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;SINC&gt; wrote in message news:5500918@discussion.autodesk.com...&lt;BR /&gt;
Are you saying that you've successfully gotten Keywords to work with the PromptSelectionObjects method?&lt;BR /&gt;
&lt;BR /&gt;
There is already code posted in this thread that is not substantially different than what I've tried.  I've also tried using the SetKeywords method, also with no effect.  But if you can point out what's wrong with the code that's already posted, that would answer the question.&lt;BR /&gt;
&lt;BR /&gt;
I can use Keywords with every other kind of prompt, just not the "Select Objects" prompt.&lt;/SINC&gt;</description>
      <pubDate>Tue, 27 Feb 2007 05:46:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623569#M81944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-27T05:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623570#M81945</link>
      <description>Usually it takes a little bit of poking around in &lt;BR /&gt;
the related classes using the object browser, to &lt;BR /&gt;
find the missing pieces of the puzzle.&lt;BR /&gt;
&lt;BR /&gt;
Keywords work differently with multiple object&lt;BR /&gt;
selection, where they are not returned in the&lt;BR /&gt;
XxxxxResult classes, or by calling a managed &lt;BR /&gt;
equivalent of the acedGetInput() function.&lt;BR /&gt;
&lt;BR /&gt;
Instead, they are exposed through an event or &lt;BR /&gt;
callback mechanism (just as they are in native&lt;BR /&gt;
ObjectARX .... hint... hint... ).&lt;BR /&gt;
&lt;BR /&gt;
[code]&lt;BR /&gt;
&lt;BR /&gt;
// using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;&lt;BR /&gt;
// using Autodesk.AutoCAD.ApplicationServices;&lt;BR /&gt;
// using Autodesk.AutoCAD.Runtime;&lt;BR /&gt;
// using Autodesk.AutoCAD.EditorInput;&lt;BR /&gt;
&lt;BR /&gt;
public class GetSelectionKeywordSample&lt;BR /&gt;
{&lt;BR /&gt;
   [CommandMethod( "SSKWORD" )]&lt;BR /&gt;
   public static void SSKWord()&lt;BR /&gt;
   {&lt;BR /&gt;
      Editor ed = AcadApp.DocumentManager.MdiActiveDocument.Editor;&lt;BR /&gt;
      PromptSelectionOptions ops = new PromptSelectionOptions();&lt;BR /&gt;
      ops.Keywords.Add( "FOO" );&lt;BR /&gt;
      ops.Keywords.Add( "BAR" );&lt;BR /&gt;
      ops.KeywordInput += &lt;BR /&gt;
           new SelectionTextInputEventHandler( OnKeywordInput );&lt;BR /&gt;
      PromptSelectionResult res = ed.GetSelection( ops );&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   static void OnKeywordInput( object sender, &lt;BR /&gt;
                              SelectionTextInputEventArgs e )&lt;BR /&gt;
   {&lt;BR /&gt;
      Prompt( "\nLOOK ---&amp;gt; Keyord input: {0}", e.Input );&lt;BR /&gt;
   }&lt;BR /&gt;
&lt;BR /&gt;
   private static void Prompt( string fmt, params object args )&lt;BR /&gt;
   {&lt;BR /&gt;
      AcadApp.DocumentManager.MdiActiveDocument.Editor.WriteMessage(&lt;BR /&gt;
         string.Format( fmt, args ) );&lt;BR /&gt;
   }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
[/code]&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;SINC&gt; wrote in message news:5500918@discussion.autodesk.com...&lt;BR /&gt;
Are you saying that you've successfully gotten Keywords to work with the PromptSelectionObjects method?&lt;BR /&gt;
&lt;BR /&gt;
There is already code posted in this thread that is not substantially different than what I've tried.  I've also tried using the SetKeywords method, also with no effect.  But if you can point out what's wrong with the code that's already posted, that would answer the question.&lt;BR /&gt;
&lt;BR /&gt;
I can use Keywords with every other kind of prompt, just not the "Select Objects" prompt.&lt;/SINC&gt;</description>
      <pubDate>Tue, 27 Feb 2007 06:30:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623570#M81945</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-27T06:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623571#M81946</link>
      <description>Great, thanks!&lt;BR /&gt;
&lt;BR /&gt;
This is an excellent example of a place where sample code would make the documentation much clearer.</description>
      <pubDate>Tue, 27 Feb 2007 20:12:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623571#M81946</guid>
      <dc:creator>Sinc</dc:creator>
      <dc:date>2007-02-27T20:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623572#M81947</link>
      <description>Hi,&lt;BR /&gt;
I try the code which was posted by Tony but it doesnt work. No Keyword are shown in the Commandline.&lt;BR /&gt;
Her is the code. Its looks like Tony's&lt;BR /&gt;
&lt;BR /&gt;
string hPrompt = "\n" + hMenu1 + ": " + hHBOptions.MissingPlaceHeight.ToString() + " mm";&lt;BR /&gt;
ed.WriteMessage(hPrompt);&lt;BR /&gt;
		        &lt;BR /&gt;
hSelectionOptions = new PromptSelectionOptions();&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenu1);&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenuDefault);&lt;BR /&gt;
//		            hSelectionOptions.Keywords.Default = hMenuDefault;&lt;BR /&gt;
hSelectionOptions.KeywordInput += new SelectionTextInputEventHandler( OnMPMakeKeywordInput );		            &lt;BR /&gt;
		            &lt;BR /&gt;
PromptSelectionResult hResult = ed.GetSelection(hSelectionOptions);&lt;BR /&gt;
&lt;BR /&gt;
The Commandline:&lt;BR /&gt;
Höhe: 0 mm&lt;BR /&gt;
Objekte wählen: (You see no keyword are shown)&lt;BR /&gt;
&lt;BR /&gt;
It would by nice when anybody out there has any tip.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
Regards Juergen</description>
      <pubDate>Wed, 12 May 2010 13:43:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623572#M81947</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-12T13:43:40Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623573#M81948</link>
      <description>GetSelection() doesn't show keywords.&lt;BR /&gt;
&lt;BR /&gt;
If you want to see the keywords, you have to show them&lt;BR /&gt;
yourself (I think the property is 'MessageForAdding').&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2011&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;JUERGEN.BECKER&gt; wrote in message &lt;BR /&gt;
news:6389936@discussion.autodesk.com...&lt;BR /&gt;
Hi,&lt;BR /&gt;
I try the code which was posted by Tony but it doesnt work. No Keyword are shown &lt;BR /&gt;
in the Commandline.&lt;BR /&gt;
Her is the code. Its looks like Tony's&lt;BR /&gt;
&lt;BR /&gt;
string hPrompt = "\n" + hMenu1 + ": " + hHBOptions.MissingPlaceHeight.ToString() &lt;BR /&gt;
+ " mm";&lt;BR /&gt;
ed.WriteMessage(hPrompt);&lt;BR /&gt;
&lt;BR /&gt;
hSelectionOptions = new PromptSelectionOptions();&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenu1);&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenuDefault);&lt;BR /&gt;
//             hSelectionOptions.Keywords.Default = hMenuDefault;&lt;BR /&gt;
hSelectionOptions.KeywordInput += new SelectionTextInputEventHandler( &lt;BR /&gt;
OnMPMakeKeywordInput );&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionResult hResult = ed.GetSelection(hSelectionOptions);&lt;BR /&gt;
&lt;BR /&gt;
The Commandline:&lt;BR /&gt;
Höhe: 0 mm&lt;BR /&gt;
Objekte wählen: (You see no keyword are shown)&lt;BR /&gt;
&lt;BR /&gt;
It would by nice when anybody out there has any tip.&lt;BR /&gt;
&lt;BR /&gt;
Thanks.&lt;BR /&gt;
Regards Juergen&lt;/JUERGEN.BECKER&gt;</description>
      <pubDate>Thu, 13 May 2010 15:56:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623573#M81948</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-13T15:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623574#M81949</link>
      <description>Hi Tony,&lt;BR /&gt;
thanks for your reply but I'm sorry your suggestion doesnt work.&lt;BR /&gt;
&lt;BR /&gt;
I inserted following code:&lt;BR /&gt;
hSelectionOptions.MessageForAdding = hPrompt + "[" + hMenu1 + "/" + hMenuDefault + "]";&lt;BR /&gt;
&lt;BR /&gt;
The Commandline shows this:&lt;BR /&gt;
Höhe: 0 mm&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: h&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: a&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: H&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]:&lt;BR /&gt;
&lt;BR /&gt;
The GetSelection-Method doesnt respond. The breakpoint after the GetSelection-MEthod doesnt reached.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards Jürgen</description>
      <pubDate>Fri, 14 May 2010 08:00:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623574#M81949</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-14T08:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623575#M81950</link>
      <description>You have to handle the keywords with the event.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2011&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;JUERGEN.BECKER&gt; wrote in message &lt;BR /&gt;
news:6391300@discussion.autodesk.com...&lt;BR /&gt;
Hi Tony,&lt;BR /&gt;
thanks for your reply but I'm sorry your suggestion doesnt work.&lt;BR /&gt;
&lt;BR /&gt;
I inserted following code:&lt;BR /&gt;
hSelectionOptions.MessageForAdding = hPrompt + "[" + hMenu1 + "/" + hMenuDefault &lt;BR /&gt;
+ "]";&lt;BR /&gt;
&lt;BR /&gt;
The Commandline shows this:&lt;BR /&gt;
Höhe: 0 mm&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: h&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: a&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]: H&lt;BR /&gt;
Fehlstellen wählen:[Höhe/Alle wählen]:&lt;BR /&gt;
&lt;BR /&gt;
The GetSelection-Method doesnt respond. The breakpoint after the &lt;BR /&gt;
GetSelection-MEthod doesnt reached.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards Jürgen&lt;/JUERGEN.BECKER&gt;</description>
      <pubDate>Fri, 14 May 2010 13:21:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623575#M81950</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-14T13:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623576#M81951</link>
      <description>Hi Tony,&lt;BR /&gt;
&lt;BR /&gt;
as you see in the following code I used ths event.&lt;BR /&gt;
&lt;BR /&gt;
hSelectionOptions = new PromptSelectionOptions();&lt;BR /&gt;
hSelectionOptions.MessageForAdding = hPrompt + "[" + hMenu1 + "/" + hMenuDefault + "]";&lt;BR /&gt;
hSelectionOptions.AllowDuplicates = false;&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenu1);&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenuDefault);	            &lt;BR /&gt;
hSelectionOptions.Keywords.Default = hMenuDefault;&lt;BR /&gt;
&lt;BR /&gt;
hSelectionOptions.KeywordInput += new SelectionTextInputEventHandler( OnMPMakeKeywordInput );	&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionResult hResult = ed.GetSelection(hSelectionOptions);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards Jürgen</description>
      <pubDate>Fri, 14 May 2010 18:52:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623576#M81951</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-14T18:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623577#M81952</link>
      <description>The code I have that uses keywords with GetSelection()&lt;BR /&gt;
works. When I type a keyword, the event handler is called.&lt;BR /&gt;
&lt;BR /&gt;
You're also assuming that a default keyword is supported&lt;BR /&gt;
by GetSelection(), which is not the case.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2011&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;JUERGEN.BECKER&gt; wrote in message &lt;BR /&gt;
news:6391777@discussion.autodesk.com...&lt;BR /&gt;
Hi Tony,&lt;BR /&gt;
&lt;BR /&gt;
as you see in the following code I used ths event.&lt;BR /&gt;
&lt;BR /&gt;
hSelectionOptions = new PromptSelectionOptions();&lt;BR /&gt;
hSelectionOptions.MessageForAdding = hPrompt + "[" + hMenu1 + "/" + hMenuDefault &lt;BR /&gt;
+ "]";&lt;BR /&gt;
hSelectionOptions.AllowDuplicates = false;&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenu1);&lt;BR /&gt;
hSelectionOptions.Keywords.Add(hMenuDefault);&lt;BR /&gt;
hSelectionOptions.Keywords.Default = hMenuDefault;&lt;BR /&gt;
&lt;BR /&gt;
hSelectionOptions.KeywordInput += new SelectionTextInputEventHandler( &lt;BR /&gt;
OnMPMakeKeywordInput );&lt;BR /&gt;
&lt;BR /&gt;
PromptSelectionResult hResult = ed.GetSelection(hSelectionOptions);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards Jürgen&lt;/JUERGEN.BECKER&gt;</description>
      <pubDate>Sat, 15 May 2010 03:56:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623577#M81952</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-15T03:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623578#M81953</link>
      <description>Hi Tony,&lt;BR /&gt;
&lt;BR /&gt;
thanks for your reply.&lt;BR /&gt;
&lt;BR /&gt;
Now I knew what happens. &lt;BR /&gt;
I must not use the normal objectselection keywords like CROSS or WINDOWS. When I use different ones it works.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks to you. Your help was very usefull.&lt;BR /&gt;
&lt;BR /&gt;
Regards jürgen</description>
      <pubDate>Sat, 15 May 2010 17:03:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/1623578#M81953</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-15T17:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/4729911#M81954</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Sorry to have to reinvoke this thread but I am having some trouble with the new keywords being noticed as keywords and thus firing the '.KeywordInput event'. It's also worth noting that the '&lt;SPAN&gt;.KeywordInput' event fires when ONLY the useDefault keyword is entered, all other keywords fire the '.UnkownInput' event. How do I add the keywords so that they are considered keywords and thus fire the correct event?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I just noticed some odd behaviour, only the keywords with the following format are recognised (where x = don't care) "xxxxxxxxx_default". Why?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Code is as follows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;''' &amp;lt;summary&amp;gt;
''' Dimension Encapsulation styles.
''' &amp;lt;/summary&amp;gt;
&amp;lt;CommandMethod("TD1")&amp;gt;
Public Shared Sub dimEncapsulation()

    Dim useDefault As String = "USe_default"
    Dim fromLibrary As String = "from_LIbrary"
    Dim manage As String = "MAnage"

    Dim acDoc As Document
    acDoc = Core.Application.DocumentManager.MdiActiveDocument
    Dim ed As Editor = acDoc.Editor
    Dim db As Database = acDoc.Database

    'Retrieve the default encapsulation
    Dim dimEncapsulationSelected As nDimEncapsulation.ciDimEncapsulationStyle = nDimEncapsulation.cDocumentIO.getDefaultPrefix()
    useDefault += " " + dimEncapsulationSelected.prefix.text + "&amp;lt;&amp;gt;" + dimEncapsulationSelected.suffix.text

    Dim promptSelOpt As New PromptSelectionOptions()
    With promptSelOpt
        .Keywords.Add(useDefault)
        .Keywords.Add(fromLibrary)
        .Keywords.Add(manage)
        .Keywords.Default = useDefault
        Dim kws As String = .Keywords.GetDisplayString(False)
        .MessageForAdding = vbNewLine + "Add objects to selection or " + kws
        .MessageForRemoval = vbNewLine + "Remove objects from selection or " + kws

        AddHandler .KeywordInput, AddressOf keywordEntered
        AddHandler .UnknownInput, AddressOf keywordInputNull
    End With

    Dim promptSelRes As PromptSelectionResult = ed.GetSelection(promptSelOpt)

    'Handle the result
    If promptSelRes.Status = PromptStatus.OK Then
        'Start the transaction
        Dim tr As Transaction = db.TransactionManager.StartTransaction
        Using tr

            For Each i As SelectedObject In promptSelRes.Value
                Dim dimension As Dimension = DirectCast(tr.GetObject(i.ObjectId, OpenMode.ForWrite), Dimension)

                dimension.Prefix = dimEncapsulationSelected.prefix.text
                dimension.Suffix = dimEncapsulationSelected.suffix.text
            Next

            'Don't forget to commit the changes to the database
            tr.Commit()
        End Using
    End If

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Jan 2014 22:48:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/4729911#M81954</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-05T22:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Keywords and GetSelection</title>
      <link>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/11997718#M81955</link>
      <description>&lt;P&gt;If someone else is struggling with keywords, &lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-DF40DD82-FD27-43C5-B7D2-E75646B2E47E" target="_blank" rel="noopener"&gt;here&lt;/A&gt; is a part of AutoCAD .NET API documentation where it is stated that underscore can't be part of a keyword when using Editor.GetKeyword method. Maybe the same works for Editor.GetSelection with keywords.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also one more important thing is to avoid conflict with AutoCAD default PromptSelectionOptions keywords which are listed&amp;nbsp;&lt;A href="https://help.autodesk.com/view/OARX/2023/ENU/?guid=OARX-ManagedRefGuide-Autodesk_AutoCAD_EditorInput_PromptSelectionOptions_RemoveKeywordsFromFullList_SubtractedKeywords" target="_blank" rel="noopener"&gt;here.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings.&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 08:10:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/keywords-and-getselection/m-p/11997718#M81955</guid>
      <dc:creator>vucic_tamara</dc:creator>
      <dc:date>2023-05-30T08:10:43Z</dc:date>
    </item>
  </channel>
</rss>

