Can the Content Cache and query components be made to work with external files? For example, what if I like to use the Rhino 9 (WIP) and use Rhino.Inside.Revit to retrieve the data from the WIP file using Grasshopper in Revit.
GHData components may work for you in this case, depending on what you are transferring.
We do plan on adding a Document
data type which could be fed into the Content Cache and Query components so that you could be acting on a remote 3dm document instead of the active Rhino document. This is planned for Rhino 9, but the feature isn’t complete just yet.
There is a file importer and a folder reading component that can be used for this.
I use it to read one or many file formats into Grasshopper and deal with the Geometry and attributes of the objects in Grasshopper. It can also be used as a passthrough definition to other formats:
Technically the results of import content can be then placed in Directshape components, or sorted into Component families and sent to Revit. And in some ways never need to use Content Cache to do this, but just pass thru Grasshopper right into Revit.
That’s what I was looking for, forgot about these and that they have more options than the Read File and Import 3dm components.
That said, you are probably well aware that the Content Details and Content Information components don’t work without a reference to the active document:
Though I did find a way to make this work, which is really neat as I can use this to filter attributes and all, so this is really exiting stuff.
Data passthrough.gh (23.2 KB)
Correct, about the document. The objects are more floating Grasshopper objects that can be baked into Rhino if needed, adding them to the current document. The objects are organized in a tree based on the docs they were read in on.
The example below shows two ways of dealing with “Documents”. The regular Content Cache will push it into the Active Doc. But the Export Block definition essentially uses a Block definition as a quick doc container that can be used to export the files back out without any push.
Technically using Model Object can be used to attach all the traditional attributes to the import. In the example below the Geometry and Layer are paired into a model object after import.
Of course if there was a Revit doc around the objects could be pushed into Revit without pushing them into a doc.
And then there is a 4th way to do this, which is to create a new headless doc in a script component and write files from there: Rhino - Code-Driven File IO
It seems like the synchronise function of the File Path component and Import Content does not work, because it is only when I rewire the File Path to the Import Content component that the file contents are updated:
This applies to 9.0.24311.305 and 8.13.24303.13001.
I need to check with @kike to figure out how that is supposed to work.
I get the contents of a folder to update automatically with all the file contents using this double synchronize setup:
The results can be put in a block definition directly, or the contents of the files can be streamed out in a tree.
Might either of these work?
Ah, hadn’t checked the synchronisation option on the directory input (didn’t know it was there). Guess that’s why that didn’t work for me.
I’ll test this out tomorrow morning.
Sorry didn’t get around to testing this earlier. The method shown does not seem to be working. Whenever I save a .3dm to the supplied directory, the outputs are empty.
The odd thing is that the components expire and refresh when I add a panel, even though I don’t connect it to anything.
@kike are you able to reproduce this?
Data passthrough.gh (26.3 KB)
Set the Path component to “Select a Directory” and this is the result using the sample file you sent.
Saving new files also does update in the folder.
This is running with Revit it looks like? What service release of Rhino is running?
Hi @Intuos,
I changed the category due this issue is Revit specific.
I set a directory as well, the downloads folder.
[Window Title]
Rhino.Inside - About
[Main Instruction]
Rhino.Inside© for Revit
[Content]
Rhino.Inside Revit: 1.24.9022.17166 (2024-09-13T09:32:12)
[Expanded Information]
Rhino: 8.13.24303.13001 (Rhino 8)
Revit: 2025.3 (25.3.0.46)
CLR: 8.0.0 (8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14)
OS: Microsoft Windows NT 10.0.19045.0
[V] See details [Web site] [Read license] [See source code] [OK]
[Footer]
Press CTRL+C to copy this information to Clipboard
Hi @Intuos,
This should be implemented on the daily channel available now.
If you want to give it a try, please update RiR to 1.27.
Nice, thanks @kike for the fix!