<?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 Reacting to entity modified event, weird behavior while debugging in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/reacting-to-entity-modified-event-weird-behavior-while-debugging/m-p/10858409#M14205</link>
    <description>&lt;P&gt;I've added an event handler to an Entities Modified event, and I have set breakpoints to the beginning of my event handler method. As I'm debugging, when I select the entity and use the color changer in the ribbon, the event seems to trigger before a selection has even been made. And then I'm unable to actually make the selection because then I'm in the debugger in Visual Studio, though the color dropdown is still drawn over visual studio.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there some way I should be handling this event differently?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using(Transaction tr = Active.Database.TransactionManager.StartTransaction())
            {
                Entity ent = id.GetObject(OpenMode.ForWrite, false) as Entity;

                ent.Modified += ZoneModifiedEvent.ZoneModified;

                tr.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 00:22:06 GMT</pubDate>
    <dc:creator>nshupeFMPE3</dc:creator>
    <dc:date>2022-01-05T00:22:06Z</dc:date>
    <item>
      <title>Reacting to entity modified event, weird behavior while debugging</title>
      <link>https://forums.autodesk.com/t5/net-forum/reacting-to-entity-modified-event-weird-behavior-while-debugging/m-p/10858409#M14205</link>
      <description>&lt;P&gt;I've added an event handler to an Entities Modified event, and I have set breakpoints to the beginning of my event handler method. As I'm debugging, when I select the entity and use the color changer in the ribbon, the event seems to trigger before a selection has even been made. And then I'm unable to actually make the selection because then I'm in the debugger in Visual Studio, though the color dropdown is still drawn over visual studio.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Is there some way I should be handling this event differently?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using(Transaction tr = Active.Database.TransactionManager.StartTransaction())
            {
                Entity ent = id.GetObject(OpenMode.ForWrite, false) as Entity;

                ent.Modified += ZoneModifiedEvent.ZoneModified;

                tr.Commit();
            }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 00:22:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/reacting-to-entity-modified-event-weird-behavior-while-debugging/m-p/10858409#M14205</guid>
      <dc:creator>nshupeFMPE3</dc:creator>
      <dc:date>2022-01-05T00:22:06Z</dc:date>
    </item>
  </channel>
</rss>

