Over 1.096.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips.
Try the new precise Engineering calculator and the updated Barcode generator.
New AutoCAD 2026 commands and variables.
CAD tip # 7812:
Question
A
The AutoLISP functions (write-line) and (write-char) automatically add the full CR/LF sequence (carriage return, line feed) when trying to output just the LF (line-feed, chr 10).
There is a trick of forcing AutoCAD to output really just the line-feed. Use the (write-char) function and add 256 to the character code. So instead of (write-char 10 f), use (write-char 266 f). An example:
(setq f (open "C:/TEMP/TESTFILE.TXT" "w")) (write-char 266 f) (close f)writes a file testfile.txt containing just the LF character.
ACAD2011


23.2.2011
18338×
applies to: AutoCAD 2011 ·