<?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: how to add context menu to the specific BlockReference in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6665327#M33930</link>
    <description>&lt;P&gt;IMHO this topic can help you: &lt;A href="http://adndevblog.typepad.com/autocad/2012/06/enabledisable-object-context-menu-for-specific-entity.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/06/enabledisable-object-context-menu-for-specific-entity.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Only instead of checking Xdata you have to check layer name.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 15:41:39 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2016-11-03T15:41:39Z</dc:date>
    <item>
      <title>how to add context menu to the specific BlockReference</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6665017#M33929</link>
      <description>&lt;P&gt;I hope to add the context menu to the Blockreference and on the&amp;nbsp; specific Layrer(eg,the block on the TestLayer show contextmenu)&lt;/P&gt;
&lt;P&gt;how to do?&lt;/P&gt;
&lt;PRE&gt;private static ContextMenuExtension menuExtension;       
        internal static void Attach()
        {
            menuExtension = new ContextMenuExtension();
            MenuItem item = new MenuItem("To Red");
            item.Click += new EventHandler(item_Click);
            menuExtension.MenuItems.Add(item);
       =&amp;gt;     RXClass rxClass = Entity.GetClass(typeof(BlockReference));
.....=&amp;gt;(how to add Layer filter)
            Application.AddObjectContextMenuExtension(rxClass, menuExtension);
        }&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Nov 2016 14:06:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6665017#M33929</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-03T14:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to add context menu to the specific BlockReference</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6665327#M33930</link>
      <description>&lt;P&gt;IMHO this topic can help you: &lt;A href="http://adndevblog.typepad.com/autocad/2012/06/enabledisable-object-context-menu-for-specific-entity.html" target="_blank"&gt;http://adndevblog.typepad.com/autocad/2012/06/enabledisable-object-context-menu-for-specific-entity.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Only instead of checking Xdata you have to check layer name.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 15:41:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6665327#M33930</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2016-11-03T15:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to add context menu to the specific BlockReference</title>
      <link>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6666559#M33931</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/481027"&gt;@Alexander.Rivilis﻿&lt;/a&gt; thank you very much! it's what I need.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 23:52:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/how-to-add-context-menu-to-the-specific-blockreference/m-p/6666559#M33931</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-11-03T23:52:13Z</dc:date>
    </item>
  </channel>
</rss>

