Storing geolib Dfoundations output file in memory

We are using GeoLib to calculate our tension and bearing piles model. We can build the entire model however we cannot create the output .foi file. To create the model, the Geolib documentation explains I need to use the function model.serialize(filename) where model is my DFoundationsModel() (documentation). The function returns nothing, it just writes to the file.

The problem however is that this function requires a specific file path. Locally, I can write it to my c-drive. We can’t figure out however how to do it on Viktor. The Dfoundations implementation of Viktor uses BytesIo objects but the geolib function does not accept this in any way. Anybody with some advise on how to get this working?

Hi @Vincentvd,

For GeoLIB, DStability model I also had some challenges specifying a calculation path. In the end, I used a NamedTemporaryFile. This File-object has a path that GeoLIB accepts.

See also this post, but then for a GeoLIB DSettlement model:

Good luck!


Thank your for the reply. It indeed seems to work locally. In the next release we will also test it on the viktor platform but I suppose it also works.

1 Like