<?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: Convert Html as Resource and pass it to the DG::Browser.LoadHTML() method? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-Html-as-Resource-and-pass-it-to-the-DG-Browser-LoadHTML/m-p/377255#M791</link>
    <description>&lt;P&gt;Hehey evryone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am not able to create a solution for this problem =(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. i am able to convert a html page to an rc2 ressource with the&amp;nbsp;ResConv.exe&lt;/P&gt;&lt;P&gt;2. i am not able to give the convertet file a usable ressource id&amp;nbsp; (resId) and a Index.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im starting to think that this is not possible. Furthermore no Example shows how to convert a File Ressource. Evry single Example only converts pictures like svg or png to " GICN" ressources.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is also very annoying that the custom compiler dont tell you waht he doesent like on a grc file. he just tells me: "I dont like the grc file, come again" &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if anybody is able to help here, i would be really thankfull.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyway, i found a workarround:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I convert with a c# skript the html code to a string that the ressource compiler likes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. that string directyl from the grc file seem to work. even with the javascript part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_0-1681982158523.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36305i26DF45E65F85AB9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_0-1681982158523.png" alt="JoelBuehler_0-1681982158523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code then is kinda easy. just get the fixed string from the ressource with ACAPI_Resource_GetFixString(), convert it to the archicad string and pass that to the LoadHtml method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_1-1681982284684.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36306i974D5FCD02422953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_1-1681982284684.png" alt="JoelBuehler_1-1681982284684.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the char array is not in the right size, archicad crashes without bug repport and anything, so be awere!! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps for people like me that want to build a offline GUI with html&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2023 09:18:58 GMT</pubDate>
    <dc:creator>Joel Buehler</dc:creator>
    <dc:date>2023-04-20T09:18:58Z</dc:date>
    <item>
      <title>Convert Html as Resource and pass it to the DG::Browser.LoadHTML() method?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-Html-as-Resource-and-pass-it-to-the-DG-Browser-LoadHTML/m-p/376271#M790</link>
      <description>&lt;P&gt;Hehey evryone!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First of all i have to say that the browser palette rocks! thank you very much archicad guys! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Browser Palette example you show how to load a URL into the CEF Browser.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_0-1681219295042.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36032i9F8F41F7C71674CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_0-1681219295042.png" alt="JoelBuehler_0-1681219295042.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Id like to pass my own local gui that is inside a html page to the Archicad Plugin. For that id like to use the method "LoadHTML" of the DGBrowser Module.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Im Struggling to convert my html as ressource and pass the string to the LoadHTML() method.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i know that i have to use the&amp;nbsp;ACAPI_​Resource_​GetFixStr method, but i dont understand how i convert a file so i i have the needed chararray?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;does anyone have a tipp how i can accomplish that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_1-1681219542226.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36033iBC4AFF2EDA72C737/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_1-1681219542226.png" alt="JoelBuehler_1-1681219542226.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2023 13:35:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-Html-as-Resource-and-pass-it-to-the-DG-Browser-LoadHTML/m-p/376271#M790</guid>
      <dc:creator>Joel Buehler</dc:creator>
      <dc:date>2023-04-11T13:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert Html as Resource and pass it to the DG::Browser.LoadHTML() method?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Convert-Html-as-Resource-and-pass-it-to-the-DG-Browser-LoadHTML/m-p/377255#M791</link>
      <description>&lt;P&gt;Hehey evryone.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am not able to create a solution for this problem =(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. i am able to convert a html page to an rc2 ressource with the&amp;nbsp;ResConv.exe&lt;/P&gt;&lt;P&gt;2. i am not able to give the convertet file a usable ressource id&amp;nbsp; (resId) and a Index.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im starting to think that this is not possible. Furthermore no Example shows how to convert a File Ressource. Evry single Example only converts pictures like svg or png to " GICN" ressources.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is also very annoying that the custom compiler dont tell you waht he doesent like on a grc file. he just tells me: "I dont like the grc file, come again" &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if anybody is able to help here, i would be really thankfull.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anyway, i found a workarround:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. I convert with a c# skript the html code to a string that the ressource compiler likes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. that string directyl from the grc file seem to work. even with the javascript part.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_0-1681982158523.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36305i26DF45E65F85AB9D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_0-1681982158523.png" alt="JoelBuehler_0-1681982158523.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;code then is kinda easy. just get the fixed string from the ressource with ACAPI_Resource_GetFixString(), convert it to the archicad string and pass that to the LoadHtml method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JoelBuehler_1-1681982284684.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/36306i974D5FCD02422953/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JoelBuehler_1-1681982284684.png" alt="JoelBuehler_1-1681982284684.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if the char array is not in the right size, archicad crashes without bug repport and anything, so be awere!! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this helps for people like me that want to build a offline GUI with html&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 09:18:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Convert-Html-as-Resource-and-pass-it-to-the-DG-Browser-LoadHTML/m-p/377255#M791</guid>
      <dc:creator>Joel Buehler</dc:creator>
      <dc:date>2023-04-20T09:18:58Z</dc:date>
    </item>
  </channel>
</rss>

