Image from drive for data-shape logo

Is there any node to download images in a web link and save to desktop to use on data shape logo
So that we can share the graph without worrying about the location of the file in the users PC.
If we can provide a file path from google drive it would be easy to copy your files into a drive and share and the end user need not care about file location.

In short looking for a node to extract images and other files from drive/web page.

@saju_autodesk Have a look at my sheet creation script as it has a automatic image down-loader built in.

Github page: https://github.com/brencass/DynamoGraphs/

When you look at the python code that is for the image downloader you will need to change the following:

  • “ImageUrlToDownload” Link
  • any reference to “UKDynamoUserGroup.png” - replace with your file name
  • Change the file format “Imaging.ImageFormat.Png” to what your image type(gif/png/jpeg/bmp)

Note:
You will need to test it properly from the location you want to extract the file, because if it is behind some login process the above probably wont work as it needs a direct link to the image that is freely available.

3 Likes

Hi @Brendan_Cassidy,
I have never used Github and I wonder if there is a option to download the .dyn file,It gives me a page full of scripts. :frowning:
If possible can you share with the .dyn file or at least the python node.
Thanks a lot Its good to know that its possible.

I forgot to say that it is one of the sheet creation scripts.

If you go to the “Sheet Creation From Excel with code joiner.dyn*” file then it will open a lot of code, you will notice a button with “Raw” on it. Click this and then it will open the full code in your browser, right click and click save as and save the file. Do make sure it is a .dyn when you save and not a .txt file.

This will then allow you to open the file within dynamo.

3 Likes

Cool Thanks a lot…! Will give it a try.

@Brendan_Cassidy
This works like a charm thanks.

3 Likes

Good to see.

Something to note is that if you have this code as a custom node you will have to make sure every user has this node on there machines or is linked to a central area for them to be able to access that node information.

There is probably more information on this subject on the forums if you do a search for that as this will be outside the scope of this topic :slight_smile:

Hello friend and what if instead of an image I want to import a text file or a py, how would the procedure be?

Howdy Saju,
I’m curious if you would mind posting the Python code? I am trying to reproduce your above script.