<?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: CUI managed API - Cannot open cuix file from standalone .NET app in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9859746#M17997</link>
    <description>&lt;P&gt;CUIx files are a ZIP of several other files, including a CUI file, which is XML.&amp;nbsp; You're responsible for handling the "dirty work" in that case, but it's a lot more straight forward - especially if&amp;nbsp; you're just reading content like workspace names.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2020 18:53:49 GMT</pubDate>
    <dc:creator>dgorsman</dc:creator>
    <dc:date>2020-11-10T18:53:49Z</dc:date>
    <item>
      <title>CUI managed API - Cannot open cuix file from standalone .NET app</title>
      <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858293#M17993</link>
      <description>&lt;P&gt;I've read in documentation that CUI managed API is possible to access and edit .cuix file from standalone .net application.&lt;/P&gt;&lt;P&gt;Following instructions from documentation (&lt;A href="https://help.autodesk.com/view/OARX/2021/ENU/?guid=GUID-577EDC34-0A10-4D63-BED4-ECA4570355A3)," target="_blank" rel="noopener"&gt;https://help.autodesk.com/view/OARX/2021/ENU/?guid=GUID-577EDC34-0A10-4D63-BED4-ECA4570355A3),&lt;/A&gt; I attempted to do some very simple thing: just to load .cuix file, and write number of Workspaces.&lt;/P&gt;&lt;P&gt;Here is the very simple method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;CustomizationSection customizationSection = new CustomizationSection("[path to .cuix file on disk]");
Console.WriteLine(customizationSection.Workspaces.Count);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details of my app:&lt;/P&gt;&lt;P&gt;- It is very simple 64 bit console app in .NET 4.8.&lt;/P&gt;&lt;P&gt;- Added references to &lt;EM&gt;AcCui.dll, &lt;/EM&gt;as noted in documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I set property for assembly "local copy" to "False", as instructed, then will get an error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;System.IO.FileNotFoundException: Could not load file or assembly 'AcCui, Version=24.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;If I set property for assembly "local copy" to "True",&amp;nbsp; then will get an error:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;System.InvalidProgramException: Common Language Runtime detected an invalid program.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Can you, please, help me and tell me what I did wrong here? Are documentation wrong, or incomplete, or i miss something important to perform such a simple operation?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Thanks.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 10:48:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858293#M17993</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T10:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: CUI managed API - Cannot open cuix file from standalone .NET app</title>
      <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858516#M17994</link>
      <description>&lt;P&gt;Try to put your exe-file in directory with acad.exe&lt;/P&gt;
&lt;P&gt;I haven't tested it for a long time, but about ten years ago, accui.dll could be used that way. In recent versions, accui.dll depends on acdbmgd.dll. So not sure what will work.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 12:36:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858516#M17994</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-11-10T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: CUI managed API - Cannot open cuix file from standalone .NET app</title>
      <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858664#M17995</link>
      <description>&lt;P&gt;Thanks, Alexander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I copy my application exe file in the same folder where acad.exe is, then it will work (at least, can read CUIX file, will now attempt to manipulate - to create some UI elements).&lt;/P&gt;&lt;P&gt;However, that doesn't sound as right way to use it, but will do the job.&lt;/P&gt;&lt;P&gt;If there is no other way, then it would be good to mention this in documentation of Managed .NET Developer's guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 13:27:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858664#M17995</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-10T13:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: CUI managed API - Cannot open cuix file from standalone .NET app</title>
      <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858771#M17996</link>
      <description>&lt;P&gt;&lt;A href="https://adndevblog.typepad.com/autocad/2012/07/using-accuidll-cui-api-outside-autocad.html" target="_blank"&gt;https://adndevblog.typepad.com/autocad/2012/07/using-accuidll-cui-api-outside-autocad.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 14:06:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9858771#M17996</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2020-11-10T14:06:34Z</dc:date>
    </item>
    <item>
      <title>Re: CUI managed API - Cannot open cuix file from standalone .NET app</title>
      <link>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9859746#M17997</link>
      <description>&lt;P&gt;CUIx files are a ZIP of several other files, including a CUI file, which is XML.&amp;nbsp; You're responsible for handling the "dirty work" in that case, but it's a lot more straight forward - especially if&amp;nbsp; you're just reading content like workspace names.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 18:53:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/cui-managed-api-cannot-open-cuix-file-from-standalone-net-app/m-p/9859746#M17997</guid>
      <dc:creator>dgorsman</dc:creator>
      <dc:date>2020-11-10T18:53:49Z</dc:date>
    </item>
  </channel>
</rss>

