I often encounter cases where I have an IFC file linked into my main Revit project.
Simply sending that linked file over via the Revit connector leads to a lot of information loss, which I’d like to avoid. The information loss comes from Revit’s handling of IFC files (converting to .ifc.RVT with DirectShapes etc.), not Speckle.
What I’d like to do instead is commiting the IFC file directly to a separate commit/branch/project and then overlay both models.
I’d be able to do this programmatically instead of utilizing the Speckle Revit Connector UI, if there is a way to do so (basically a small Revit plugin that sends the main model and the IFC file separately on click). I couldn’t find anything that seemed appropriate for sending IFC files on speckle’s github however. Is there a way to do this? If so, would I still be restricted by the 100MB filesize?
Hey @grub ,
Such an interesting idea!
You can use our File Upload Service API to achieve this - unfortunately, these endpoints are not yet documented, but you can see how it’s being used by the frontend.
The file size limitation is set on the server, if you’re self hosting I think you could set it to whatever you want.
Eventually, this is also something the connector could do automatically…
Hey @teocomi thanks for your answer - good to know that the filesize limitation is set by Speckle servers!
I just glanced over the piece of code you sent, and it seems like using this endpoint would always upload the entire thing, i.e. no diffing happening. Am I seeing this correct? I gues since IFC files don’t change too often one could reduce load by just comparing timestamps and only re-uploading if the IFC actually changed, though this seems a bit hacky.
Hi @grub, when you upload a file to any service, there’s no real diffing we can do. It’s up to you to upload the correct file. That’s the problem with files, and that’s why decompose them into atomic objects as soon as we can
Diffing and de-duplication will happen on the object level inside the server’s storage layer.
Hey @dimitrie seems like I was a bit sloppy on my wording in the initial question. I do indeed want to send Revit and IFC DATA, not the files themselves. Given @teocomis answer, it seems like Speckle does not offer a way to do so for IFC data, hence no diffing. Rather, I’d have to upload the entire file using the File Upload API. Is this correct?
Curious if there are any plans for an actual IFC connector for piping IFC data on Speckle’s end?
The IFC upload is the “Connector” for IFC. This could be a discovery route if you have an application natively using IFC data. Still, the Connector paradigm assumes a running application as a desktop or a web application. For the most part (sidestepping the Schema vs File format debaters), it will be a file if you have IFC data outside an application.
Which is a leading state of, where would you expect diffing to occur?
If not on parsing an uploaded file, then this could be in the browser. As a frontend development option, moving the processing from the backend to the frontend - a frontend which would be a “Connector”. Your original post posited this being done on a button press within a running Revit instance - already a known memory hog
In the browser, this would be a consideration of an upload bandwidth vs a memory allocation trade-off.
This is not an appealing development option for us in the Revit path.