line break in text property value
I got a ifc from some other In this ifc the text property values had line breaks. See attached screen.
I had a look at the ifc code and the following character where used
I made a own example ...
... #81=IFCPROPERTYSINGLEVALUE('MyProperty',$,IFCTEXT('Line break is possible inside a IfcText.\X\0D\X\0AThere was a line break.\X\0D\X\0AEven a empty line is possible.\X\0D\X\0A\X\0D\X\0ASome enumeration too\X\0D\X\0A- some text\X\0D\X\0A- more text\X\0D\X\0A- even more text\X\0D\X\0A- still some text'),$); ...
looks in BIMCollabZoom like this:
Some Viewer and cloud plattform do support it some not. This results in the following question. Is this official BuildingSmart IFC standard? If yes where to find this on the internet?
Furthermore I would be interested if there is a simple way of adding this by IfcOpenShell without knowing this charactercode.
Attached the ifc exported from FreeCAD and edited with editor.
Don't really understand your question, it's just basic unicode if that is what you mean?
Does it mean
\X\0D\X\0Ais the unicode character for a line break?
Are all unicode characters allowed in ifc? Is there some information about this available?
If I get in contact with software support I can here the answer right now ... "this is not supported by ifc" If could post a link to some ifc page which says all unicode characters are allowed
This is a carriage return followed by a line feed, which is the Windows encoding for a new line, so not really standard.
Which part is the carriage return and which part is the line feed? Where do you know this from? I could not find anything on the internet in this regard.
\Xindicates that an encoded byte follows, so the whole thing is just two bytes in hex
0D0A(which has lots of search results). This is sometimes written
\r\n, ie. a carriage return followed by a line feed.
thanks very much I have been using IFC for over 10 years ... never understood the character for the special German letters ÄÜÖ in IFC. It is because I did not know about these \x and thus never found something on the internet ... Great information.
It all makes sense now for me ...
BTW ... does BB gui shows the line breaks in property values ?
Blender itself doesn't support multi-line text fields so I don't think it is possible now. I think
\nwil add a newline but this will depend on who's reading the value back :)
For example if you add a text object annotation and modify the text literal with a line break, it will show up with a line break in the viewport. Not in the properties panel, though.
In Python you can directly use Unicode and IfcOpenShell will handle the tranformations! See code snippet:
Ifc file opened in notepad++
ifc file opended in xbim viewer
I guess this means that a Unix line feed 0A (or \n) is sufficient, no need for a Windows 0D0A
very cool example. Would it be possible to add your created ifc to your post. So anybody could test if his prefered viewer supports this.
Cool! I think I will start using this emoji for the FireRating property.
🌤️ IsExternal True
@bernd I added the ifc file! Some ifc viewer could have a problem, because there is no geometry in this file...
I also did test this file with https://validate.buildingsmart.org/, there are two errors, however not related to the unicode byte enconding or that there are no geometry. I think it has something to do with the template function. Not sure
No unicode vision in BIMVision. :-(
At least the line breaks work in BIMVision. Solibri does not even read and displays the line breaks ...