Hello, at the old forum I’ve found a discussion about making folder with Grasshopper,
There is a .gh file which does the work, but it only creates the folder in the desktop.
What should I change in the C# code to create a folder in a custom place ?
you can do almost anything from Grasshopper. This question is about basic programming. The best resource can be found on Microsoft Developers page or on Stack Overflow.
Is there a way to add an output that changes from the false (default) to true once the folder is created successfully? I am trying to trigger a copy function (using a different component) that expects the folder to exist already, so it has to be triggered AFTER the create folder has done its thing.
Really coming to the limitations of what you can do with GH components (not code) in terms of timing these things…
Creating files and folders is not an async operation (of course unless you invoke them async). This means, once a new file/folder had been created it should be pretty straightforward to add any bool to the output, since GH only continues until the folder had been created . So assuming you created a new Output Parameter called „A“ you can assign a true to within the conditional branch and for any other a false.
You can also track behavior of files and directories by using the FileWatcher class and subscribing to its events. But I can only repeat the following on and on. Prevent creating async behavior from scripts and Gh definitions, and if you do keep it within the scope of execution. Scripts are meant to be linear, Gh definitions as well.
Hello ,
plz I need a help the create folder is working but suddenly it stop for no reason , so why many times it crush???or if it is working the other component that create the new destination stop and crush , as attached in the picture
Normally it will overwrite anything without warning.
I noticed that your paths contain spaces, which means you might have to handle it differently in Python. I don’t know much Python, but usually you have to escape the spaces or put " " around the path if it contains spaces. Otherwise it will just look for the part till the first space, which is E:/Save in your case.
Yes this is possible, but it won’t be as simple as creating it within one line. Google Drive is a Web/Cloud service, so you have to trigger this over the Google API. I don’t know how to do this in detail …
You should be able to integrate your google drive as a folder/drive just like you can do with dropbox etc. Then you should be able to just access it via its folder path.