cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
kency
Enthusiast

Downloading an image for surface creation from a URL

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
Expert

You can use cUrl lib or built in HTTP classes.

BIMquants.comBETA - Free Plugin for Quantities and Costs Estimation in Archicad.
kency
Enthusiast

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);

 

Akos Somorjai
Graphisoft
Graphisoft

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.
Akos Somorjai
Graphisoft
Graphisoft

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!