<?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 Switch between files in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7616882#M28626</link>
    <description>&lt;P&gt;Hi,&amp;#11;&lt;BR /&gt;I have developed a windows Form, when user initiate the form it will read some data of file and list it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question, if there is multipule file open and user switch between them,&amp;#11;then i need to refresh 'my form' each time when user switches between files,&amp;#11;so that the form to show the proper Details of file..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am having a refresh sub in my code, that need to called if user switches between files.&lt;BR /&gt;&lt;BR /&gt;Can anyone guide me please..&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2017 13:52:46 GMT</pubDate>
    <dc:creator>waseefur.rahman</dc:creator>
    <dc:date>2017-12-12T13:52:46Z</dc:date>
    <item>
      <title>Switch between files</title>
      <link>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7616882#M28626</link>
      <description>&lt;P&gt;Hi,&amp;#11;&lt;BR /&gt;I have developed a windows Form, when user initiate the form it will read some data of file and list it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question, if there is multipule file open and user switch between them,&amp;#11;then i need to refresh 'my form' each time when user switches between files,&amp;#11;so that the form to show the proper Details of file..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am having a refresh sub in my code, that need to called if user switches between files.&lt;BR /&gt;&lt;BR /&gt;Can anyone guide me please..&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 13:52:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7616882#M28626</guid>
      <dc:creator>waseefur.rahman</dc:creator>
      <dc:date>2017-12-12T13:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between files</title>
      <link>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7617059#M28627</link>
      <description>&lt;P&gt;I assume&amp;nbsp;you show a form as modeless (floating) dialog, which is a Win Form (you can also use WPF window, or PaletteSet, for the matter of discussion). Obviously, user can only switch current drawing in AutoCAD while your form is visible, if the form is a modeless one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, if the information showing on the form is related to the current drawing in AutoCAD, when the current drawing changes, the form should update its data being shown (or, clear the form, or close the form...). In general, you achieve this by handling DocumentCollection.DocumentBecameCurrent, or DocumentCollection.DocumentActivated events. In most cases, you'd use the former.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are 2 articles I wrote a while ago that would give you some help/hints:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://drive-cad-with-code.blogspot.ca/2014/02/showing-and-closing-modeless-formdialog.html" target="_blank"&gt;http://drive-cad-with-code.blogspot.ca/2014/02/showing-and-closing-modeless-formdialog.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://drive-cad-with-code.blogspot.ca/2016/08/showing-current-selection-in-modeless.html" target="_blank"&gt;http://drive-cad-with-code.blogspot.ca/2016/08/showing-current-selection-in-modeless.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 14:38:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7617059#M28627</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2017-12-12T14:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between files</title>
      <link>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7618063#M28628</link>
      <description>&lt;P&gt;You can use the DocumentCollection's DocumentActivated event to detect a change in the active document (do not use the DocumentBecameCurrent event, as that &lt;EM&gt;does not&lt;/EM&gt; signal that a document has become the active document).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also take a more sophisticated&amp;nbsp;approach that involves the use of data binding, which allows you to maintain separation of your UI and your application/business logic. See &lt;A href="https://forums.autodesk.com/DocumentBecameCurrent" target="_blank"&gt;&amp;gt;&amp;gt;this post&amp;lt;&amp;lt;&lt;/A&gt; for an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4333282"&gt;@waseefur.rahman&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hi,&amp;#11;&lt;BR /&gt;I have developed a windows Form, when user initiate the form it will read some data of file and list it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question, if there is multipule file open and user switch between them,&amp;#11;then i need to refresh 'my form' each time when user switches between files,&amp;#11;so that the form to show the proper Details of file..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am having a refresh sub in my code, that need to called if user switches between files.&lt;BR /&gt;&lt;BR /&gt;Can anyone guide me please..&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:11:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7618063#M28628</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-12T19:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Switch between files</title>
      <link>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7628667#M28629</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;You can use the DocumentCollection's DocumentActivated event to detect a change in the active document (do not use the DocumentBecameCurrent event, as that &lt;EM&gt;does not&lt;/EM&gt; signal that a document has become the active document).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can also take a more sophisticated&amp;nbsp;approach that involves the use of data binding, which allows you to maintain separation of your UI and your application/business logic. See &lt;A href="https://forums.autodesk.com/DocumentBecameCurrent" target="_blank"&gt;&amp;gt;&amp;gt;this post&amp;lt;&amp;lt;&lt;/A&gt; for an example.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Sorry, that was a broken link, the post is &amp;gt;&lt;A href="https://forums.autodesk.com/t5/net/if-active-drawing-switches/m-p/7415583#M55388" target="_blank"&gt;here&lt;/A&gt;&amp;lt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Dec 2017 00:17:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/switch-between-files/m-p/7628667#M28629</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2017-12-16T00:17:02Z</dc:date>
    </item>
  </channel>
</rss>

