cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad C++ API
About Archicad add-on development using the C++ API.

Reading Image Data From RFIX Folder in Browser_Control Type Project

greg-evolvelab
Participant

I have a project similar to the Browser_Control example project. Using JavascriptEngine::LoadURL, I serve the UI from the url of an index.html file which references webpacked files such as app.js, app.css, chunk-vendors.js, and chunk-vendors.css, and several image resources. I want to serve the UI from the user's filesystem so as not to have to rely on a separate remote UI site for every version of the addon that's released. (I think I would have to do this to support older versions.)

So I've been reading the html, js, and css files from RFIX folder, and writing them to the user's appData cache, and this has worked. I've achieved this by using the following code adapted from the example project:

readWebFilesCode.png


The problem is that I cannot seem to read data from image files in the same way.  I only am able to read a couple metadata segments in the form of UniString, but no actual compressed image content.  I've experimented with many of the resource loading functions, but I can't seem to get anything to work that might allow me to read an image resource as binary, or as something I can convert to binary. Is there a known way of doing this?

Thanks in advance!

0 REPLIES 0