xBimTeam / XbimExchange

XbimExchange contains several COBie schemas and serialisation functions as well as the Model Validation library adopted by theNBS digital toolkit.
https://xbimteam.github.io/
Other
46 stars 41 forks source link

Trouble with CobieLiteUK values that are not text #22

Closed Jero9999 closed 7 years ago

Jero9999 commented 7 years ago

This is not actually a bug per se. It is just that trying to get some cobie fields to come through when their data types are not text is really hard. With numbers it's not so bad, those conversions aren't that region specific - though there are some differences how the decimal point is represented. But with date fields it is not fun at all to do the conversion. So far I haven't managed it. In both these cases the local region of the OS is used to get appropriate formats. This is really bad if the data is external data that may have come from a different region.

One of the problems is that due to the lack of documentation and no error messages, there is no option to work out how to get the conversion right is to read the code.

My point is this: just use text. Or even better have a "strict" flag somewhere in the exporter options. If strict is on, do the conversion to the appropriate data type. If strict is disabled then let any old stuff through. Then the user / coder has the choice of which to use. Whatever you do you are going to need to handle globalisation somehow.

Jero9999 commented 7 years ago

I am not sure I was even remotely right about this issue. I think I just red the code completely wrong. I'm going to close it.