Serialization of IfcStore.Instances not possible
Hi team,
I try to find a way to serialize lists of IIfcProduct extracted from IfcStore.Instances, representing the content of different submodels (like floors or spaces). I tried without success to serialize as xml, json, binary...
Context:
- based on a model IFC and a list of root ids as input (IFC Guids) I need as output to have the full wexbim and also a collection of wexbims for submodels (all floors, spaces, etc).
A possible approach:
- a first web app receives as input IFC + root ids. It loads the IFC in IfcStore (32 seconds), writes the full wexbim, creates lists of serializable IfcStore.IIfcProduct and store these in a queue
- a second web app takes as input one of the IfcStore.IIfcProduct list from the queue, generates sub-ifc (using the time consuming IfcStore.InsertCopy) and writes it as a wexbim.
Why?
- there can be multiple instances of the second app, working in parallel and generate sub-ifc for sub-models
- if the second app receives a list of serialized IIfcProducts, can directly create a new ifc for sub-model without loading the initial input ifc file (input of first app) and avoid spending 32 seconds for loading the ifc in IfcStore for each submodel generation
Are there any helpers / components or a better approach to achieve my goal? I highly appreciate any suggestions.
Thank you! Alex
It seems you are in the direction to BCF
I think this got discussed over on https://github.com/xBimTeam/XbimEssentials/issues/256
There's no easy answer to this... It also depends on the use cases and a lot of other considerations such as access control, audit trails etc. At a simplistic level, the Esent model was intended for this kind of purpose. i.e. a persistent, indexed random-access means to query and manipulate IFC models. But I know it's not the perfect solution - there's a lot you need to layer on top for a web app.
(We've got a PaaS service based on XBIM that might help with this kind of scenario)