<?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 : Not able to remove eventhandler in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242513#M36517</link>
    <description>&lt;P&gt;I don't understand why you are handling SelectionAdded event if you just need to get the selected objects.&lt;/P&gt;
&lt;P&gt;Why don't you complete the selection and then pass the selected objects to your viewmodel.getattribute() method ?&lt;/P&gt;</description>
    <pubDate>Wed, 30 Mar 2016 19:24:17 GMT</pubDate>
    <dc:creator>_gile</dc:creator>
    <dc:date>2016-03-30T19:24:17Z</dc:date>
    <item>
      <title>Not able to remove eventhandler</title>
      <link>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242389#M36516</link>
      <description>&lt;P&gt;I am using below eventhandler to add e.selectionadded event&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;&lt;PRE&gt;AddHandler ed.SelectionAdded, AddressOf testit&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I am using below statement to remove it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;RemoveHandler ed.SelectionAdded, AddressOf testit&lt;/PRE&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;&lt;P&gt;But it does not get removed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My testit function,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Public viewmodel As New GetATT_ViewModel
 Public Sub testit(sender As Object, e As SelectionAddedEventArgs)
        Dim objectid() As ObjectId = e.AddedObjects.GetObjectIds

        viewmodel.getattribute(objectid)


    End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read somewhere that you need to make function shared but I can not make that as I am calling another function in it which is not shared.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 18:36:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242389#M36516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-30T18:36:03Z</dc:date>
    </item>
    <item>
      <title>Re : Not able to remove eventhandler</title>
      <link>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242513#M36517</link>
      <description>&lt;P&gt;I don't understand why you are handling SelectionAdded event if you just need to get the selected objects.&lt;/P&gt;
&lt;P&gt;Why don't you complete the selection and then pass the selected objects to your viewmodel.getattribute() method ?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 19:24:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242513#M36517</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2016-03-30T19:24:17Z</dc:date>
    </item>
    <item>
      <title>Re : Not able to remove eventhandler</title>
      <link>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242559#M36518</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/109424"&gt;@_gile﻿&lt;/a&gt;&amp;nbsp;If you are talking about select object then user hits button to get information of that object, It will be manual right? Its like addign another step.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted whenever user selects block, palete displayes its attributes, thats why I aded ed.selectionadded event handler&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it clarifies&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pankaj&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2016 19:47:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/not-able-to-remove-eventhandler/m-p/6242559#M36518</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-30T19:47:32Z</dc:date>
    </item>
  </channel>
</rss>

