<?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 Re: Run command on double click block with specific name? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805705#M50894</link>
    <description>&lt;P&gt;The solution is the ed.selectatpickbox method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The method ed.getnestedentity returns the modelspace objectid so this is a no go for me.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2013 12:01:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-03-15T12:01:52Z</dc:date>
    <item>
      <title>Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3790442#M50878</link>
      <description>&lt;P&gt;I wrote a couple of functions one of them creates a block with a Name let say "MyBlock".&lt;/P&gt;&lt;P&gt;I wrote a command "MyBlockEdit" where the selected block attribute data is displayed in a custom form to change some of the properties.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now&amp;nbsp;I want to add the folowing function:&lt;/P&gt;&lt;P&gt;When a block with the blockname "MyBlock" is doubleclicked the command "MyBlockEdit" is triggered in place of the attribute editor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone show me the way how to apply this?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2013 16:00:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3790442#M50878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-26T16:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3790586#M50879</link>
      <description>&lt;P&gt;This has been discussed recently and Balaji Remamoorthy has posted a solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://forums.autodesk.com/t5/NET/How-to-capture-double-click-event-in-AutoCAD-using-VB-NET/td-p/3712178"&gt;http://forums.autodesk.com/t5/NET/How-to-capture-double-click-event-in-AutoCAD-using-VB-NET/td-p/3712178&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://adndevblog.typepad.com/autocad/2012/12/customizing-double-click-on-block-reference.html"&gt;http://adndevblog.typepad.com/autocad/2012/12/customizing-double-click-on-block-reference.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also posted a solution in my blog, in which user do not have to modify DoubleClick action in CUI. see it here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://drive-cad-with-code.blogspot.ca/2012/12/custom-double-click-action-using.html"&gt;http://drive-cad-with-code.blogspot.ca/2012/12/custom-double-click-action-using.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Feb 2013 18:08:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3790586#M50879</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2013-02-26T18:08:35Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792108#M50880</link>
      <description>&lt;P&gt;Norman, thanks to you I established to trigger the doubleclick command. However I'm strugling with the select.implied.&lt;/P&gt;&lt;P&gt;I've added temprorary a editor msg with the count of the selected objects. When I use select.implied it always return 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my other command MyBlockEdit I also use the select.implied, this however doesn't seem to give any problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think (not sure of it) that when I double click the selection gets lost and there is nothing selected anymore.?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 06:54:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792108#M50880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-28T06:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792473#M50881</link>
      <description>&lt;P&gt;Are you saying that in the Application.BeginDoubleClick event handler, the Editor.SelectImplied() always return 0 count of selected?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you double-click on an entity, does it get highlighted? Or is the pickbox (cursor) too small and no entity is actually selected when you double-click?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you show&amp;nbsp;your code in the event handler?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 14:43:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792473#M50881</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2013-02-28T14:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792579#M50882</link>
      <description>&lt;P&gt;Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm out of office right now so can't copy the exact code, will do this first thing tomorrow.&lt;/P&gt;&lt;P&gt;The code looks like this:&lt;/P&gt;&lt;PRE&gt;Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
ed.WriteMessage(vbCrLf &amp;amp; "Custom Double-Click action started.")
Dim res As PromptSelectionResult = ed.SelectImplied
If res.Status = PromptStatus.OK Then
    ed.WriteMessage(vbCrLf &amp;amp; res.Value.Count &amp;amp; " object(s) selected.")
    'some more code to check if the selection is the right Dynamic Block...
End If&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the message that the double-click action is started.&lt;/P&gt;&lt;P&gt;The return of the selected object count is always 0.&lt;/P&gt;&lt;P&gt;ed.selectprevious or ed.selectlast returns 1 (or more) but is never the correct selected entity...&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 15:50:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792579#M50882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-02-28T15:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792741#M50883</link>
      <description>&lt;P&gt;If your's code is a command it must have CommandFlags.UsePickSet attribute in order to use ed.SelectImplied&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 18:00:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3792741#M50883</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-02-28T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793187#M50884</link>
      <description>&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's not a command, its a Double-Click handler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code from my app:&lt;/P&gt;&lt;PRE&gt;Public Shared Sub MyDblClick(ByVal sender As Object, ByVal e As BeginDoubleClickEventArgs)
    Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
    ed.WriteMessage(vbCrLf &amp;amp; "Custom Double-Click action started.")
    Dim res As PromptSelectionResult = ed.SelectImplied
    If res.Status = PromptStatus.OK Then
        ed.WriteMessage(vbCrLf &amp;amp; res.Value.Count &amp;amp; " object(s) selected.")
        'some more code to check if the selection is the right Dynamic Block...
    End If
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I've tested some more with the code from above:&lt;/P&gt;&lt;P&gt;Double-Clicking on a Polyine, Rectangle,... it will return the number of the selected items.&lt;/P&gt;&lt;P&gt;Double-Clicking on a block (without attributes) = result of selected items.&lt;/P&gt;&lt;P&gt;Double-Clicking on a block (with attributes) = &lt;STRONG&gt;no result of the selected items.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I pass this problem?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:16:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793187#M50884</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-01T06:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793195#M50885</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Alexander,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
Double-Clicking on a block (with attributes) = &lt;STRONG&gt;no result of the selected items.&lt;/STRONG&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I pass this problem?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It is look like a bug. But I think there is workaround: using&amp;nbsp;&lt;SPAN class="Element146"&gt;PointMonitor&lt;/SPAN&gt; event to monitor entity under cursor in moment of doubleclick. &lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 06:56:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793195#M50885</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-01T06:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793568#M50886</link>
      <description>&lt;P&gt;OK, I verified with this code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void Application_BeginDoubleClick(object sender, BeginDoubleClickEventArgs e)
        {
            Document dwg = Application.DocumentManager.MdiActiveDocument;
            Editor ed = dwg.Editor;

            PromptSelectionResult res = ed.SelectImplied();
            if (res.Status == PromptStatus.OK)
            {
                ed.WriteMessage("{0} entit{1} selected.", res.Value.Count, res.Value.Count &amp;gt; 1 ? "ies" : "y");
            }
            else
            {
                ed.WriteMessage("\nCannot select implied selection set.");
            }
        }&lt;/PRE&gt;&lt;P&gt;The Editor.SelectImplied() work with line, circle, arc, block WITHOUT attribute (e.g) PromptSelectionResult.Status returns OK). However, if we double-click a block that has attribute, the returned status is PromptStatus.Error. So, I am not sure if it is by design (probably not, because the built-in doubleclick action defined by the CUI works). It could be a bug as Alexander suggested. If so, it is serious blow to my double-click solution, because calling up custom dialog box on double-click would likely be used more often on editing block with attribute. I'll have to find workaround and updte my blog post.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently only have access to Acad2012, and hope this has already been fixed in Acad 2013, or upcoming Acad2014?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 15:15:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3793568#M50886</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2013-03-01T15:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3794327#M50887</link>
      <description>&lt;P&gt;Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is still there in 2013 (+SP1), this is the version we use about 3 months now.&lt;/P&gt;&lt;P&gt;We have no plans to upgrade straight away to the 2014 when its available becouse where are in a Vault implementation process right now for all our Autodesk Software.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll try to search for a work arround, if I would find a solution I'll post it here.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2013 06:32:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3794327#M50887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-02T06:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805261#M50888</link>
      <description>&lt;P&gt;I have finally found a bit time to work out an solution to the issue you have (or rather, the issue my posted solution has): Editor.SelectImplied() does not select a blockreference that has attributes. I would consider a bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My workaround is to drop using Editor.SelectImplied() in the Application_BeginDoubleClick event handler. I published a new article in my blog on the updated solution here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://drive-cad-with-code.blogspot.ca/2013/03/update-custom-double-click-action-using.html"&gt;http://drive-cad-with-code.blogspot.ca/2013/03/update-custom-double-click-action-using.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 19:42:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805261#M50888</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2013-03-14T19:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805563#M50889</link>
      <description>&lt;P&gt;Norman,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've just read your new post.&lt;/P&gt;&lt;P&gt;However I can't access the ed.SelectAtPickbox()&lt;/P&gt;&lt;P&gt;'SelectAtPickbox' is not a member of 'Autodesk.Autocad.Editorinput.Editor'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using VB.net 2010 (because my C# isn't so good &lt;img id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://forums.autodesk.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt; )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;***EDIT&lt;/P&gt;&lt;P&gt;Looks like it was to early this morning, your solution was ok.&lt;/P&gt;&lt;P&gt;***END EDIT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 07:34:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805563#M50889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-15T07:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805639#M50891</link>
      <description>&lt;P&gt;Hi, Norman!&lt;/P&gt;
&lt;P&gt;Great job! Criticism is accepted? Not tested but (IMHO):&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;1. You have to convert points to UCS &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;because&lt;/SPAN&gt;&lt;/SPAN&gt; SelectCrossingPolygon method use points in UCS.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;2. Maybe using method &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;Editor.GetNestedEntity&lt;/SPAN&gt;&lt;/SPAN&gt; with PromptNestedEntityOptions.UseNonInteractivePickPoint == true instead of &lt;SPAN class="short_text"&gt;&lt;SPAN class="hps"&gt;SelectCrossingPolygon will be useful.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 10:13:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805639#M50891</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-15T10:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805683#M50892</link>
      <description>&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried your solution, but the selected entity is the modelspace entity and not the selected block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Normaly when a attribute block is DoubleClicked it sends the EATTEDIT command followed by the block location (point3d)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because we've vetoed the EATTEDIT command I would like to supress the following line:&lt;/P&gt;&lt;P&gt;Command: 281.959074,252.067108,0.000000 Unknown command "959074,252.067108,0.000000".&amp;nbsp; Press F1 for help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 11:30:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805683#M50892</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-15T11:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805702#M50893</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;
&lt;P&gt;Alexander,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've tried your solution, but the selected entity is the modelspace entity and not the selected block.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is the solution?&amp;nbsp;You're talking about using Editor.GetNestedEntity? &lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 11:58:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805702#M50893</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-15T11:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805705#M50894</link>
      <description>&lt;P&gt;The solution is the ed.selectatpickbox method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The method ed.getnestedentity returns the modelspace objectid so this is a no go for me.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 12:01:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805705#M50894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-15T12:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805712#M50895</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;... The method ed.getnestedentity returns the modelspace objectid so this is a no go for me...&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Try this code to identify selected BlockReference:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;[CommandMethod("TestSel")]
public static void TestSel()
{
  Document doc = Application.DocumentManager.MdiActiveDocument;
  Editor ed = doc.Editor;
  PromptPointResult ppr = ed.GetPoint("\nPick Point on entity: ");
  if (ppr.Status != PromptStatus.OK) return;
  PromptNestedEntityOptions pneo = new PromptNestedEntityOptions("");
  pneo.NonInteractivePickPoint = ppr.Value;
  pneo.UseNonInteractivePickPoint = true;
  PromptNestedEntityResult pner = ed.GetNestedEntity(pneo);
  if (pner.Status != PromptStatus.OK) return;
  ObjectId[] ids = pner.GetContainers();
  using (Transaction tr = doc.TransactionManager.StartTransaction()) {
    Entity ent = tr.GetObject(pner.ObjectId, OpenMode.ForRead) as Entity;
    ed.WriteMessage("\nSelected entity of class {0} with objectId = {1}", 
        ent.GetRXClass().Name, pner.ObjectId);
    if (ent is AttributeReference &amp;amp;&amp;amp; ids.Length == 0) {
      AttributeReference attr = ent as AttributeReference;
      BlockReference bref = 
          tr.GetObject(attr.OwnerId, OpenMode.ForRead) as BlockReference;
      BlockTableRecord btr = 
          tr.GetObject(bref.BlockTableRecord, OpenMode.ForRead) as BlockTableRecord;
      ed.WriteMessage("\nin BlockReference of {0} with objectId = {1}", 
              btr.Name, bref.ObjectId);
    } else if (ids.Length &amp;gt; 0) {
        BlockReference bref = 
            tr.GetObject(ids[0], OpenMode.ForRead) as BlockReference;
        BlockTableRecord btr = 
            tr.GetObject(bref.BlockTableRecord, OpenMode.ForRead) as BlockTableRecord;
        ed.WriteMessage("\nBlockReference of {0} with objectId = {1}", 
            btr.Name, bref.ObjectId);
    } else {
        ed.WriteMessage("\nSelected not BlockReference!");
    }
    tr.Commit();
  }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 12:12:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805712#M50895</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2013-03-15T12:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805765#M50896</link>
      <description>&lt;P&gt;@Alexander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your code seems to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've&amp;nbsp;done it wrong I've stopped after setting the entity to pner.objectid and didn't go further to the bref and btr (and in my case a dbtr dynamicblocktablerecord to determine the real name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 12:46:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805765#M50896</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-03-15T12:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805907#M50897</link>
      <description>&lt;P&gt;Thank you Alexander. Yes, I should have take into UCS into account. I'll update if I can manage a bit time for it.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2013 14:45:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/3805907#M50897</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2013-03-15T14:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Run command on double click block with specific name?</title>
      <link>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/4333765#M50898</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This runs fine with AutoCAD. With AutoCAD Mechanical, at least with Rel. 2012, the BeginDoubleClick event is only fired, if the double-click is run without any entity. Any idea?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2013 21:49:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/run-command-on-double-click-block-with-specific-name/m-p/4333765#M50898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-17T21:49:04Z</dc:date>
    </item>
  </channel>
</rss>

