We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

CR vs LF. How a new line is exported by the TEXT I/O Add-on

Anonymous
Not applicable
I'm developing a script to write BTL files to program a CNC machine. The text files I export look fine on a Mac in TextEdit, but when I open them on a PC in Notepad, there are no line breaks.

Wikipedia tells me that there are two different ASCII codes used: 10=LF=Line Feed, and 13=CR=Carriage Return.

"Windows and OS/2 require the sequence CR,LF to represent a newline, while Unix and relatives use just the LF, and Classic Mac OS (but not Mac OS X) uses just the code CR."

ArchiCAD seems to be outputting only one of these characters, it's not creating the correct line breaks on the PC platform. (And I've tried it from ArchiCAD in OS 10.8, OS 10.9 and Win7.)

I've also tried using "Separator='\r\n' " as part of the OPEN command, but so far without any improvement.

Does anyone know how to get it to output CR,LF?
4 REPLIES 4
Ben Cohen
Advocate
Hi Rhonie

Did you have any success with the line endings?
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Anonymous
Not applicable
I haven't had any joy yet. Do you have the magic bullet?
Ben Cohen
Advocate
no sorry. I was hoping you found an answer
I have tried a few work arounds but nothing has worked.
Ben Cohen
Mac and PC
Archicad (Latest Version) aus
www.4DLibrary.com.au
Matthew Johnson
Advocate
Rhonie,

If it is just viewing the file that is the issue have you tried using Wordpad or MS Word rather than Notepad? The newer programs (incl MS Excel) will read the variants of the line break correctly.

I suppose it depends on what your passing the file to as your next step towards the CNC machine.
Matthew Johnson - POWE Architects
AC4.5 --> AC27 & Revit 2016 --> 2023
Asus Zenbook Pro 16x i9-13900H w/ Nvidia RTX 4070 4K dual, Windows 11 64bit + Quest3
I'd rather be sailing.