<?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: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299226#M68548</link>
    <description>eric,&lt;BR /&gt;
&lt;BR /&gt;
great, thank's a lot, alfred&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In article &amp;lt;501C6E5E23A1CF7013495E1ED477E51E@in.WebX.maYIadrTaRb&amp;gt;, &lt;BR /&gt;
edo@rahco.com says...&lt;BR /&gt;
&amp;gt; I delved into the interop DLL file (I am using AcadX's "fixed" one) and&lt;BR /&gt;
&amp;gt; renamed two instances of Activate to DocActivate, then recompiled the&lt;BR /&gt;
&amp;gt; assembly.  For an example on how to decompile an interop DLL and then&lt;BR /&gt;
&amp;gt; recompile it after you are done changing things, go to&lt;BR /&gt;
&amp;gt; http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309336.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; In case someone else has this problem, I will post the two lines that I&lt;BR /&gt;
&amp;gt; changed.  Be careful though, because there are many other instances of the&lt;BR /&gt;
&amp;gt; word 'Activate' that you want to leave alone:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; From:&lt;BR /&gt;
&amp;gt; .event AutoCAD._DAcadDocumentEvents_ActivateEventHandler Activate&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; To:&lt;BR /&gt;
&amp;gt; .event AutoCAD._DAcadDocumentEvents_ActivateEventHandler DocActivate&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; From:&lt;BR /&gt;
&amp;gt; .method public virtual instance void&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Activate() cil managed&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; To:&lt;BR /&gt;
&amp;gt; .method public virtual instance void&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; DocActivate() cil managed&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Now I can simply += on AcadDocument.DocActivate instead of&lt;BR /&gt;
&amp;gt; AcadDocument.Activate and it works perfectly.  You still refer to the&lt;BR /&gt;
&amp;gt; originally named delegates, however, when assigning your handling method.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Anyway, thanks for the inspiration, Alfred!&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Eric&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; "Eric Olson" &lt;EDO&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:9897C22F14BECEE27FE178223DAF61ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Hi Everyone,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I think there is a problem with the AcadDocument.Activate event when used&lt;/EDO&gt;</description>
    <pubDate>Wed, 20 Nov 2002 02:54:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2002-11-20T02:54:15Z</dc:date>
    <item>
      <title>C# .NET AcadDocument.Activate Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299222#M68544</link>
      <description>Hi Everyone,&lt;BR /&gt;
&lt;BR /&gt;
I think there is a problem with the AcadDocument.Activate event when used in&lt;BR /&gt;
C#.NET (possibly related to the wrapper).  In the object browser, it doesn't&lt;BR /&gt;
show up like the rest of the events (with a lightning bolt icon next to it)&lt;BR /&gt;
and for all intents and purposes, appears to be a method.  I looked in the&lt;BR /&gt;
AutoCAD dev help file (that comes with AutoCAD) and lo and behold, there is&lt;BR /&gt;
a method called Activate() AND an event called Activate.&lt;BR /&gt;
&lt;BR /&gt;
In VB6 I never had a problem differentiating between the two of these.  To&lt;BR /&gt;
be honest, I never used the Activate() method, only the event.  Now, in C#,&lt;BR /&gt;
I am trying to use the event and I get an error at compile-time:&lt;BR /&gt;
&lt;BR /&gt;
C:\VSJ\ACADBOM\BOMAX\BomDocument.cs(117): 'AutoCAD.IAcadDocument.Activate()'&lt;BR /&gt;
denotes a 'method' which is not valid in the given context&lt;BR /&gt;
&lt;BR /&gt;
This is the code:&lt;BR /&gt;
&lt;BR /&gt;
// Instantiate the event delegates.&lt;BR /&gt;
    _docActivated = new&lt;BR /&gt;
_DAcadDocumentEvents_ActivateEventHandler(onDocActivate);&lt;BR /&gt;
    _docDeactivate = new&lt;BR /&gt;
_DAcadDocumentEvents_DeactivateEventHandler(onDocDeactivate);&lt;BR /&gt;
    _beginClose = new&lt;BR /&gt;
_DAcadDocumentEvents_BeginCloseEventHandler(onBeginClose);&lt;BR /&gt;
    _beginSave = new&lt;BR /&gt;
_DAcadDocumentEvents_BeginSaveEventHandler(onBeginSave);&lt;BR /&gt;
    _endSave = new _DAcadDocumentEvents_EndSaveEventHandler(onEndSave);&lt;BR /&gt;
&lt;BR /&gt;
    // Add our event handlers to the document's notify list.&lt;BR /&gt;
    acdDoc.Activate += _docActivate;  // PROBLEM IS HERE&lt;BR /&gt;
    acdDoc.Deactivate += _docDeactivate;&lt;BR /&gt;
    acdDoc.BeginClose += _beginClose;&lt;BR /&gt;
    acdDoc.BeginSave += _beginSave;&lt;BR /&gt;
    acdDoc.EndSave += _endSave;&lt;BR /&gt;
&lt;BR /&gt;
Anyone have any ideas?&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Eric</description>
      <pubDate>Thu, 14 Nov 2002 07:24:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299222#M68544</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-14T07:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: C# .NET AcadDocument.Activate Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299223#M68545</link>
      <description>Does anyone have a solution to this or a suggestion on what to try?&lt;BR /&gt;
&lt;BR /&gt;
"Eric Olson" &lt;EDO&gt; wrote in message&lt;BR /&gt;
news:9897C22F14BECEE27FE178223DAF61ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Everyone,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I think there is a problem with the AcadDocument.Activate event when used&lt;BR /&gt;
in&lt;BR /&gt;
&amp;gt; C#.NET (possibly related to the wrapper).  In the object browser, it&lt;BR /&gt;
doesn't&lt;BR /&gt;
&amp;gt; show up like the rest of the events (with a lightning bolt icon next to&lt;BR /&gt;
it)&lt;BR /&gt;
&amp;gt; and for all intents and purposes, appears to be a method.  I looked in the&lt;BR /&gt;
&amp;gt; AutoCAD dev help file (that comes with AutoCAD) and lo and behold, there&lt;BR /&gt;
is&lt;BR /&gt;
&amp;gt; a method called Activate() AND an event called Activate.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; In VB6 I never had a problem differentiating between the two of these.  To&lt;BR /&gt;
&amp;gt; be honest, I never used the Activate() method, only the event.  Now, in&lt;BR /&gt;
C#,&lt;BR /&gt;
&amp;gt; I am trying to use the event and I get an error at compile-time:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; C:\VSJ\ACADBOM\BOMAX\BomDocument.cs(117):&lt;BR /&gt;
'AutoCAD.IAcadDocument.Activate()'&lt;BR /&gt;
&amp;gt; denotes a 'method' which is not valid in the given context&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; This is the code:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; // Instantiate the event delegates.&lt;BR /&gt;
&amp;gt;     _docActivated = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_ActivateEventHandler(onDocActivate);&lt;BR /&gt;
&amp;gt;     _docDeactivate = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_DeactivateEventHandler(onDocDeactivate);&lt;BR /&gt;
&amp;gt;     _beginClose = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_BeginCloseEventHandler(onBeginClose);&lt;BR /&gt;
&amp;gt;     _beginSave = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_BeginSaveEventHandler(onBeginSave);&lt;BR /&gt;
&amp;gt;     _endSave = new _DAcadDocumentEvents_EndSaveEventHandler(onEndSave);&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     // Add our event handlers to the document's notify list.&lt;BR /&gt;
&amp;gt;     acdDoc.Activate += _docActivate;  // PROBLEM IS HERE&lt;BR /&gt;
&amp;gt;     acdDoc.Deactivate += _docDeactivate;&lt;BR /&gt;
&amp;gt;     acdDoc.BeginClose += _beginClose;&lt;BR /&gt;
&amp;gt;     acdDoc.BeginSave += _beginSave;&lt;BR /&gt;
&amp;gt;     acdDoc.EndSave += _endSave;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Anyone have any ideas?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; Eric&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/EDO&gt;</description>
      <pubDate>Mon, 18 Nov 2002 16:04:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299223#M68545</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-18T16:04:09Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299224#M68546</link>
      <description>eric,&lt;BR /&gt;
&lt;BR /&gt;
sorry to say that i missed it also, what i think (out of expirience with &lt;BR /&gt;
handling voloview with vb.net) is that the change of privilages of the &lt;BR /&gt;
sinkhelperclasses within the interop.autocad.dll has for document_activate a &lt;BR /&gt;
handler called "Activate", this name is so global that many other classes will &lt;BR /&gt;
use it also and so you (and i) don't get it running for autocad.&lt;BR /&gt;
&lt;BR /&gt;
what happened in voloview: that was a function "Layout" i missed, also a name &lt;BR /&gt;
used by form-classes..., the interop-file had a function called "CtlLayout" &lt;BR /&gt;
instead and that worked. so it seems that the translation was done from .net &lt;BR /&gt;
while creating the interop-file.&lt;BR /&gt;
&lt;BR /&gt;
the chance i see is if someone with more knowledge than i have could edit the &lt;BR /&gt;
interop.autocad.il-file and rename the "Activate"-handlings.&lt;BR /&gt;
&lt;BR /&gt;
i hope that my idea gives a kick to someone and is a help for us.&lt;BR /&gt;
&lt;BR /&gt;
thanx in advance, - alfred -&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In article &amp;lt;759F4E5745D904C3A101A8229331DAEA@in.WebX.maYIadrTaRb&amp;gt;, &lt;BR /&gt;
edo@rahco.com says...&lt;BR /&gt;
&amp;gt; Does anyone have a solution to this or a suggestion on what to try?&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; "Eric Olson" &lt;EDO&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:9897C22F14BECEE27FE178223DAF61ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Hi Everyone,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I think there is a problem with the AcadDocument.Activate event when used&lt;BR /&gt;
&amp;gt; in&lt;BR /&gt;
&amp;gt; &amp;gt; C#.NET (possibly related to the wrapper).  In the object browser, it&lt;BR /&gt;
&amp;gt; doesn't&lt;BR /&gt;
&amp;gt; &amp;gt; show up like the rest of the events (with a lightning bolt icon next to&lt;BR /&gt;
&amp;gt; it)&lt;BR /&gt;
&amp;gt; &amp;gt; and for all intents and purposes, appears to be a method.  I looked in the&lt;BR /&gt;
&amp;gt; &amp;gt; AutoCAD dev help file (that comes with AutoCAD) and lo and behold, there&lt;BR /&gt;
&amp;gt; is&lt;BR /&gt;
&amp;gt; &amp;gt; a method called Activate() AND an event called Activate.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; In VB6 I never had a problem differentiating between the two of these.  To&lt;BR /&gt;
&amp;gt; &amp;gt; be honest, I never used the Activate() method, only the event.  Now, in&lt;BR /&gt;
&amp;gt; C#,&lt;BR /&gt;
&amp;gt; &amp;gt; I am trying to use the event and I get an error at compile-time:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; C:\VSJ\ACADBOM\BOMAX\BomDocument.cs(117):&lt;BR /&gt;
&amp;gt; 'AutoCAD.IAcadDocument.Activate()'&lt;BR /&gt;
&amp;gt; &amp;gt; denotes a 'method' which is not valid in the given context&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; This is the code:&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; // Instantiate the event delegates.&lt;BR /&gt;
&amp;gt; &amp;gt;     _docActivated = new&lt;BR /&gt;
&amp;gt; &amp;gt; _DAcadDocumentEvents_ActivateEventHandler(onDocActivate);&lt;BR /&gt;
&amp;gt; &amp;gt;     _docDeactivate = new&lt;BR /&gt;
&amp;gt; &amp;gt; _DAcadDocumentEvents_DeactivateEventHandler(onDocDeactivate);&lt;BR /&gt;
&amp;gt; &amp;gt;     _beginClose = new&lt;BR /&gt;
&amp;gt; &amp;gt; _DAcadDocumentEvents_BeginCloseEventHandler(onBeginClose);&lt;BR /&gt;
&amp;gt; &amp;gt;     _beginSave = new&lt;BR /&gt;
&amp;gt; &amp;gt; _DAcadDocumentEvents_BeginSaveEventHandler(onBeginSave);&lt;BR /&gt;
&amp;gt; &amp;gt;     _endSave = new _DAcadDocumentEvents_EndSaveEventHandler(onEndSave);&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;     // Add our event handlers to the document's notify list.&lt;/EDO&gt;</description>
      <pubDate>Mon, 18 Nov 2002 16:49:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299224#M68546</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-18T16:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: C# .NET AcadDocument.Activate Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299225#M68547</link>
      <description>I delved into the interop DLL file (I am using AcadX's "fixed" one) and&lt;BR /&gt;
renamed two instances of Activate to DocActivate, then recompiled the&lt;BR /&gt;
assembly.  For an example on how to decompile an interop DLL and then&lt;BR /&gt;
recompile it after you are done changing things, go to&lt;BR /&gt;
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309336.&lt;BR /&gt;
&lt;BR /&gt;
In case someone else has this problem, I will post the two lines that I&lt;BR /&gt;
changed.  Be careful though, because there are many other instances of the&lt;BR /&gt;
word 'Activate' that you want to leave alone:&lt;BR /&gt;
&lt;BR /&gt;
From:&lt;BR /&gt;
.event AutoCAD._DAcadDocumentEvents_ActivateEventHandler Activate&lt;BR /&gt;
&lt;BR /&gt;
To:&lt;BR /&gt;
.event AutoCAD._DAcadDocumentEvents_ActivateEventHandler DocActivate&lt;BR /&gt;
&lt;BR /&gt;
From:&lt;BR /&gt;
.method public virtual instance void&lt;BR /&gt;
&lt;BR /&gt;
Activate() cil managed&lt;BR /&gt;
&lt;BR /&gt;
To:&lt;BR /&gt;
.method public virtual instance void&lt;BR /&gt;
&lt;BR /&gt;
DocActivate() cil managed&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now I can simply += on AcadDocument.DocActivate instead of&lt;BR /&gt;
AcadDocument.Activate and it works perfectly.  You still refer to the&lt;BR /&gt;
originally named delegates, however, when assigning your handling method.&lt;BR /&gt;
&lt;BR /&gt;
Anyway, thanks for the inspiration, Alfred!&lt;BR /&gt;
&lt;BR /&gt;
Eric&lt;BR /&gt;
&lt;BR /&gt;
"Eric Olson" &lt;EDO&gt; wrote in message&lt;BR /&gt;
news:9897C22F14BECEE27FE178223DAF61ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; Hi Everyone,&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I think there is a problem with the AcadDocument.Activate event when used&lt;BR /&gt;
in&lt;BR /&gt;
&amp;gt; C#.NET (possibly related to the wrapper).  In the object browser, it&lt;BR /&gt;
doesn't&lt;BR /&gt;
&amp;gt; show up like the rest of the events (with a lightning bolt icon next to&lt;BR /&gt;
it)&lt;BR /&gt;
&amp;gt; and for all intents and purposes, appears to be a method.  I looked in the&lt;BR /&gt;
&amp;gt; AutoCAD dev help file (that comes with AutoCAD) and lo and behold, there&lt;BR /&gt;
is&lt;BR /&gt;
&amp;gt; a method called Activate() AND an event called Activate.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; In VB6 I never had a problem differentiating between the two of these.  To&lt;BR /&gt;
&amp;gt; be honest, I never used the Activate() method, only the event.  Now, in&lt;BR /&gt;
C#,&lt;BR /&gt;
&amp;gt; I am trying to use the event and I get an error at compile-time:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; C:\VSJ\ACADBOM\BOMAX\BomDocument.cs(117):&lt;BR /&gt;
'AutoCAD.IAcadDocument.Activate()'&lt;BR /&gt;
&amp;gt; denotes a 'method' which is not valid in the given context&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; This is the code:&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; // Instantiate the event delegates.&lt;BR /&gt;
&amp;gt;     _docActivated = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_ActivateEventHandler(onDocActivate);&lt;BR /&gt;
&amp;gt;     _docDeactivate = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_DeactivateEventHandler(onDocDeactivate);&lt;BR /&gt;
&amp;gt;     _beginClose = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_BeginCloseEventHandler(onBeginClose);&lt;BR /&gt;
&amp;gt;     _beginSave = new&lt;BR /&gt;
&amp;gt; _DAcadDocumentEvents_BeginSaveEventHandler(onBeginSave);&lt;BR /&gt;
&amp;gt;     _endSave = new _DAcadDocumentEvents_EndSaveEventHandler(onEndSave);&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;     // Add our event handlers to the document's notify list.&lt;BR /&gt;
&amp;gt;     acdDoc.Activate += _docActivate;  // PROBLEM IS HERE&lt;BR /&gt;
&amp;gt;     acdDoc.Deactivate += _docDeactivate;&lt;BR /&gt;
&amp;gt;     acdDoc.BeginClose += _beginClose;&lt;BR /&gt;
&amp;gt;     acdDoc.BeginSave += _beginSave;&lt;BR /&gt;
&amp;gt;     acdDoc.EndSave += _endSave;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Anyone have any ideas?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; Thanks,&lt;BR /&gt;
&amp;gt; Eric&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;/EDO&gt;</description>
      <pubDate>Tue, 19 Nov 2002 22:29:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299225#M68547</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-19T22:29:59Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299226#M68548</link>
      <description>eric,&lt;BR /&gt;
&lt;BR /&gt;
great, thank's a lot, alfred&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
In article &amp;lt;501C6E5E23A1CF7013495E1ED477E51E@in.WebX.maYIadrTaRb&amp;gt;, &lt;BR /&gt;
edo@rahco.com says...&lt;BR /&gt;
&amp;gt; I delved into the interop DLL file (I am using AcadX's "fixed" one) and&lt;BR /&gt;
&amp;gt; renamed two instances of Activate to DocActivate, then recompiled the&lt;BR /&gt;
&amp;gt; assembly.  For an example on how to decompile an interop DLL and then&lt;BR /&gt;
&amp;gt; recompile it after you are done changing things, go to&lt;BR /&gt;
&amp;gt; http://support.microsoft.com/default.aspx?scid=kb;en-us;Q309336.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; In case someone else has this problem, I will post the two lines that I&lt;BR /&gt;
&amp;gt; changed.  Be careful though, because there are many other instances of the&lt;BR /&gt;
&amp;gt; word 'Activate' that you want to leave alone:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; From:&lt;BR /&gt;
&amp;gt; .event AutoCAD._DAcadDocumentEvents_ActivateEventHandler Activate&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; To:&lt;BR /&gt;
&amp;gt; .event AutoCAD._DAcadDocumentEvents_ActivateEventHandler DocActivate&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; From:&lt;BR /&gt;
&amp;gt; .method public virtual instance void&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Activate() cil managed&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; To:&lt;BR /&gt;
&amp;gt; .method public virtual instance void&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; DocActivate() cil managed&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Now I can simply += on AcadDocument.DocActivate instead of&lt;BR /&gt;
&amp;gt; AcadDocument.Activate and it works perfectly.  You still refer to the&lt;BR /&gt;
&amp;gt; originally named delegates, however, when assigning your handling method.&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Anyway, thanks for the inspiration, Alfred!&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; Eric&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; "Eric Olson" &lt;EDO&gt; wrote in message&lt;BR /&gt;
&amp;gt; news:9897C22F14BECEE27FE178223DAF61ED@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; Hi Everyone,&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; I think there is a problem with the AcadDocument.Activate event when used&lt;/EDO&gt;</description>
      <pubDate>Wed, 20 Nov 2002 02:54:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299226#M68548</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2002-11-20T02:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: C# .NET AcadDocument.Activate Problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299227#M68549</link>
      <description>Hi Eri,&lt;BR /&gt;
Could you please answer for following question, I thought you are also working on similar kind problem which am working on. I have embedded AutoCAD Inplace activation control in my C# application and opened a document with the help of control. am trying to get a reference for AutoCAD application and AutoCAD document objects. I have added references to acax16enu.tlb, axdb16enu.tlb ,acmgd.dll, acdbmgd.dll files. &lt;BR /&gt;
&lt;BR /&gt;
Could you please explain me how Can I get the reference for AutoCAD application object reference with in C# application so that I can get the drawing object reference from it.&lt;BR /&gt;
&lt;BR /&gt;
I would appreciate your help.&lt;BR /&gt;
Regards,&lt;BR /&gt;
Ramesh</description>
      <pubDate>Wed, 26 Jan 2005 14:19:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/c-net-acaddocument-activate-problem/m-p/299227#M68549</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-01-26T14:19:46Z</dc:date>
    </item>
  </channel>
</rss>

