BIMserver icon indicating copy to clipboard operation
BIMserver copied to clipboard

Handle IFC header data when working with low level interface

Open PavelWhiteTiger opened this issue 2 years ago • 3 comments

How to get IfcHeader? When we try download ifc model, ServerIfcModel has`t modelMetaData and IfcHeader... In all cases IfcHeader = null

PavelWhiteTiger avatar Nov 10 '23 05:11 PavelWhiteTiger

Please provide some more information on how you use BIMserver (embedded, standalone?) and how you try to access the BIMserver data ("download the IFC model"), in order to reproduce this potential issue. Also the subject line could be a bit more specific, yet less verbose.

hlg avatar Nov 12 '23 18:11 hlg

We fill the model using ClientIfcModel (in the client code) and in LongDownloadOrCheckoutAction we get ServerIfcModel, ifcHeader in ServerIfcModelis=null. IfcPluginBase on BimServer when using the writeHeader method also shows that ifcHeader == null. We are using IfcStepSerializer (ifc4)

PavelWhiteTiger avatar Nov 13 '23 07:11 PavelWhiteTiger

I assume you use recordChanges=true and ClientIfcModel.commit(String comment) to populate the model and send it to the server? This is based on the low level interface. It seems that in this case header data is indeed not transferred to the server and currently there is no way to do so or to set it explicitly. Header data population on the server is only implemented for transfer of serialized data where the serialization includes the header data (e.g. IFC-SPF as the standard serialization). Thus, if you set header properties via ClientIfcModel.getMetaData().getIfcHeader() and then use ClientIfcModel.checkin(long poid, String comment), the header data should end up on the server in the database and subsequently in following downloads. This is because contrary to incremental model transfer with commit, checkin (with recordChanges=false) serializes the whole model and transfers it in one go. However, for this method you need IfcPlugins loaded on the client side. I will tag this issue, that is header handling for low level changes, as a feature for future improvements of the low level interface. This interface needs a serious overhaul and refactoring anyway.

hlg avatar Nov 16 '23 14:11 hlg