<?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: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625038#M135788</link>
    <description>&lt;P&gt;If you changed the .Net Framework 3.5 to 4 in your Inventor 2012 addin project in VS2010, can you try below to see if it solves the problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Open the Properties window for the Autodesk.Inventor.Interop reference.&lt;/P&gt;
&lt;P&gt;2. Find the property "Embed Interop Types", and change its value to False(it defaults to True).&lt;/P&gt;
&lt;P&gt;3. Test the project to see if the event works now.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Sep 2012 01:27:34 GMT</pubDate>
    <dc:creator>YuhanZhang</dc:creator>
    <dc:date>2012-09-19T01:27:34Z</dc:date>
    <item>
      <title>OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3516206#M135775</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've got a problem with the event sink of the FileOpenDialog in C#. I want to disable the default Inventor file dialog. If I leave my delegate function with the HandlingCodeEnum.kEventCanceled setting, the default Inventor dialog box appears anyway.&lt;/P&gt;&lt;P&gt;The event sink written in VBA woks fine!&lt;/P&gt;&lt;P&gt;What I've done wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this.fileUIEvents = app.FileUIEvents;&lt;BR /&gt;// Open&lt;BR /&gt;this.fileUIEvents.OnFileOpenDialog += new FileUIEventsSink_OnFileOpenDialogEventHandler(fileUIEvents_OnFileOpenDialog);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;private void fileUIEvents_OnFileOpenDialog(ref string[] fileTypes, int parentHWND, out string fileName,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameValueMap context, out HandlingCodeEnum handlingCode)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fileName = "C:\\MindaModels\\Stange200x30.ipt";&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; handlingCode = HandlingCodeEnum.kEventCanceled;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2012 15:26:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3516206#M135775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-26T15:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3524418#M135776</link>
      <description>&lt;P&gt;Nobody has an idea?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2012 07:18:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3524418#M135776</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-03T07:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3532428#M135777</link>
      <description>&lt;P&gt;Just want to check is it working &lt;SPAN&gt;&amp;nbsp;there&amp;nbsp;&lt;/SPAN&gt;if you set the HandlingCode=kEventHandled?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jul 2012 08:29:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3532428#M135777</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2012-07-10T08:29:31Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3534606#M135778</link>
      <description>&lt;P&gt;Hello Mr. Zhang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your reply. The handling code kEventHandled also doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering, it works very well in VisualBasic but it doesn't work in C#. I can't change the signature of the fileUIEvents_OnFileOpenDialog method because of compiler erros. I think the filename and/or the handling code are not excactly transmitted to the internel Inventor event function for opening a file.&lt;/P&gt;&lt;P&gt;My inventor version is: Autodesk Inventor 2012 64-bit-Edition Build: 160, Release: 2012 RTM&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jul 2012 14:41:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3534606#M135778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-11T14:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3535474#M135779</link>
      <description>&lt;P&gt;Can you debug the project and see if the event can be fired successfully? And also you can refer to a C# sample in Inventor SDK to see how the event works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\SDK\DeveloperTools\Samples\VCSharp.NET\AddIns\SimpleAddIn&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can install the DeveloperTools.msi in below folder:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Windows XP: &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&amp;lt;Inventor install folder&amp;gt;&lt;/EM&gt;&lt;SPAN&gt;\SDK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows Vista: &amp;nbsp; C:\Users\Public\Documents\Autodesk\Inventor&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&amp;lt;version&amp;gt;&lt;/EM&gt;&lt;SPAN&gt;\SDK&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Windows 7: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; C:\Users\Public\Documents\Autodesk\Inventor&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&amp;lt;version&amp;gt;&lt;/EM&gt;&lt;SPAN&gt;\SDK&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2012 01:46:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3535474#M135779</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2012-07-12T01:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3535758#M135780</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately in the samples there are no examples with FileUIEvents.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can debug the code and the file open event was triggered successfully. My handling code works also successfully and opens from outside the Document (part, assembly), but then the file open dialog box additionaly appers. The user should not be able to open a document form the file system. Inventor does not respond to my handling code. I don't know what I can do.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jul 2012 10:03:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3535758#M135780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-12T10:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622008#M135781</link>
      <description>&lt;P&gt;I have the same issue, did you ever resolve this problem?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 05:02:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622008#M135781</guid>
      <dc:creator>joerituijn</dc:creator>
      <dc:date>2012-09-17T05:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622048#M135782</link>
      <description>&lt;P&gt;Hello joerituijn,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unfortunately this issue is still noct resolved. I think it is a bug. Do you know where I can report this bug?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 06:40:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622048#M135782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-17T06:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622102#M135783</link>
      <description>&lt;P&gt;I don't know where you'd report this. However, this forum is moderated by Autodesk, I assume they're aware of the issue.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Sep 2012 07:58:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3622102#M135783</guid>
      <dc:creator>joerituijn</dc:creator>
      <dc:date>2012-09-17T07:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623324#M135784</link>
      <description>&lt;P&gt;Can you attach a sample project to reproduce this issue?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 02:18:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623324#M135784</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2012-09-18T02:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623356#M135785</link>
      <description>&lt;P&gt;I created a test environment from scratch. Sure enough, no problems there!&amp;nbsp;&lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://forums.autodesk.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt; Now I'm going through my own project again to see what I can find. Must be something simple I overlook....&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 02:56:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623356#M135785</guid>
      <dc:creator>joerituijn</dc:creator>
      <dc:date>2012-09-18T02:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623750#M135786</link>
      <description>&lt;P&gt;Ok, a little workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should use the .Net3.5 Framework. That works!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "bug" still appears with the .Net4.0 Framework.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;(I've created a sample with the "InventorNetAddinWizard" and this sample works. This wizard creates a .Net3.5 class library.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 11:28:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623750#M135786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-18T11:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623766#M135787</link>
      <description>&lt;P&gt;That is strange, I have tested this with a .NET 4.0 framework and it works just fine (in my newly created project). In my case, the .NET framework change to 3.5 doesn't make a difference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2012 11:46:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3623766#M135787</guid>
      <dc:creator>joerituijn</dc:creator>
      <dc:date>2012-09-18T11:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625038#M135788</link>
      <description>&lt;P&gt;If you changed the .Net Framework 3.5 to 4 in your Inventor 2012 addin project in VS2010, can you try below to see if it solves the problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Open the Properties window for the Autodesk.Inventor.Interop reference.&lt;/P&gt;
&lt;P&gt;2. Find the property "Embed Interop Types", and change its value to False(it defaults to True).&lt;/P&gt;
&lt;P&gt;3. Test the project to see if the event works now.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2012 01:27:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625038#M135788</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2012-09-19T01:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625060#M135789</link>
      <description>&lt;P&gt;How about that?! It works! Awesome! A bit sad that I spend nearly a day solving it.... But still, glad it works!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2012 02:21:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625060#M135789</guid>
      <dc:creator>joerituijn</dc:creator>
      <dc:date>2012-09-19T02:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: OnFileOpenDialog - HandlingCodeEnum.kEventCanceled does not work</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625248#M135790</link>
      <description>&lt;P&gt;Hello Mr. Zhang,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it works for .NET 4.0!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2012 08:32:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/onfileopendialog-handlingcodeenum-keventcanceled-does-not-work/m-p/3625248#M135790</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-19T08:32:41Z</dc:date>
    </item>
  </channel>
</rss>

