I have a vague understanding of what "Cr" (carriage return) and "Lf" (line feed) mean (or, at least, what people on internet forms think they mean)... what I'd like to know is, specifically in Inventor, is there any reason to use (or not use) any of them in particular?
I'm asking because I've always used vbnewline but seem to invariably type "vbnewlein" more than half the time.
In iLogic and Inventor's VBA specifically, is there any reason not to use the more succinct vbCrLf, or even vbLf or vbCr?
Oh, and I'm asking in regards to their use in MessageBoxes, strings, and even output to text files via, for example, System.IO.File.WriteAllText.
Solved! Go to Solution.
Solved by JamieVJohnson2. Go to Solution.
Just answered part of my question with a quick test. While vbCrLf and vbNewLine (and also Environment.NewLine) result in a proper line break when exported to a text file with WriteAllText, vbLf and vbCr do not.
So it's down to vbNewLine and vbCrLf.
So, any reason not to use vbCrLf over vbNewLine?
From:
vbCrLf : Represents a carriage-return character combined with a linefeed character for print and display functions.
Also it states vbNewLine is now obsolete.
I didn't even think to check the actual official documentation...
That about settles it! Glad it's the one that's faster to type that's still supported 😉
Thanks!
Can't find what you're looking for? Ask the community or share your knowledge.