Archicad C++ API
About Archicad add-on development using the C++ API.

Downloading an image for surface creation from a URL

kency
Enthusiast

In order to create surface through the plugin we would like to fetch the texture image from a given URL. How can we download the image through ArchiCAD C++ code?

5 REPLIES 5
Miha Nahtigal
Advocate

You can use cUrl lib or built in HTTP classes.

BIMquants.comBETA - Quantities and Costs Estimation in Archicad - BETA testers needed.

Any options within the DevKit library? Since we are getting linker error in Windows OS when using curl.h

Found an example to GET json response in Communication_ClientTest but nothing downloads a file.

 

 

clientConnection->SetTimeout (requestTimeout);
clientConnection->Send (request);
clientConnection->Receive (response);

 

Hi,

 

Please look at the `Do_DownloadWeatherData()` example in Goodie_Functions.cpp.

 

Best, Akos

kency
Enthusiast

Hello @Akos Somorjai , Just another question on the Do_DownloadWeatherData.

  1. What does DBPrintf do? Where can I check the output
  2. The URL seems to be not working in the provided example.

Hi,

 

`DBPrintf ()` prints its output to the debugging window/console, you can safely ignore that.

The URL is just an example, feel free to submit data to any other website.

 

Best, Akos

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!