DATA input / output

I’ve created a project with some data input/output algorithms. If I move the folders with the linked data, I must relink all the data output…so I can’t use the command. any solution?

Best solution: find a decent path where to save your projects and keep that.


Possible workaround to make simpler changing the path:
Save your project to .ghx format (with “Save as…”) , then edit your .ghx file with a text editor, search and replace all your paths with the new path.
Tricky. I haven’t tried.

Hi Riccardo,
Thanks for your reply. Unfortunately, it was the only reply I was hoping not to receive. The commands are unusable to me now.
Thanks anyway; I hope it will change in the future.

Are all your data input and output from a common main folder?
If you change the common main folder , as whole, to another path, it should work.
What error are you getting?

I did some tests. The last was to try to put the main gh file in the same folder as all the data files. Then, I simply moved the folder to another place and opened the gh file again. The data was unlinked.

Strange…

Do you need to do this once or more frequently?

Have a look here:

you will need to have metahopper plugin and to replace libraries reference of the 2 c# scripts.
(Right click > manage assemblies > pick
C:\Program Files\Rhino 7\Plug-ins\Grasshopper\Components\IOComponents.gha
and delete the old one, look out the selector only see .dll, you need to change that to *.* )

I don’t use Grasshopper plugins. I don’t want my projects to depend on the development of plugins in the future. Frankly, I have had enough of the waiting for rhino and grasshopper implementations (like this one). I use only Python scripts

I understand.
But now you are shrinking your chances…

What about a script that search for ANY Data input/output component and search and replace any surce string in paths to a target string in paths …?

It could be a solution. But to do this by myself, I need to rebirth as a genius or as a David Rutten. But I think he has no time for me now…

lmao… no need!
You did the best: asked on the forum here.

I studied and edited @andheum script.
If you are on Rhino 7, on windows, you shouldn’t need to change libraries path…



Replace DataIO comps paths V0.1.gh (8.0 KB)
This search for any DataInput or DataOutput component and replace its source/destination path string with your chunks … and select the component if it was changed.


BEWARE save your files and do tests before using this for serious stuff!
You can’t “undo” the changes made by this script, only closing and reopening the .gh will do.
BUT the edits made in the DataOutput files can’t be undone by anyone, it will rewrite/create files, you’ll have to fix things manually!
We are playing with fire here!!

Also note, as in the example above, replacing \Folder\ to \Folder\Subfolder\ works, but doing this twice will lead pointers to a \Folder\Folder\Subfolder\ that might or might not exist!

3 Likes

Thanks a lot, Riccardo.
Anyway, I receive this error message:

I’m on Rhino 8 MAC.

Ok
(i’ve seen this thread tagged as “windows” also…)

right-click the c# script component, manage assemblies, there you have to replace the IOComponents.gha with the one in your system.
Maybe it is at ~/Library/Application Support/McNeel/Rhinoceros/MacPlugIns/Grasshopper/Libraries … ?
Never had a mac, so I can’t really help you here.