James Russell Posted May 5, 2011 Share Posted May 5, 2011 Hey all, Just wondering if it's possible to put a Return in the Message() Function. I want to return a concat I currently have: Message(Concat('Increment Dimmer: ',DimVal,{/Return would go here/},'Increment Channel: ',ChanVal)); Anyone know if/what to put here? Cheers, James Quote Link to comment
Vectorworks, Inc Employee klinzey Posted May 5, 2011 Vectorworks, Inc Employee Share Posted May 5, 2011 It may not work but it would be: Message(Concat('Increment Dimmer: ',DimVal,CHR(13),'Increment Channel: ',ChanVal)); but I'm not sure if a message window will properly deal with a return character on both platforms. I have some memory of it working on one platform but not the other. Kevin Quote Link to comment
James Russell Posted May 5, 2011 Author Share Posted May 5, 2011 Kevin, Unfortunately no, it just prints it all on one line and ignores Chr(13)'s existence entirely. Poor Chr(13), Hehe, J Quote Link to comment
Pat Stanford Posted May 5, 2011 Share Posted May 5, 2011 Are you sure? Try this one: Message('this is line 1',chr(10),'This is line 2'); It works on Mac for me. If you need cross platform you may need to switch to CHR(10) [linefeed] or even CHR(13),CHR(10) Quote Link to comment
James Russell Posted May 6, 2011 Author Share Posted May 6, 2011 Pat, This is what I've got at the moment: Procedure Test; Begin Message('This is line 1',chr(10),'This is line 2'); End; Run (Test); Results are attached as well as variations to chr(13) and chr(13),chr(10). It appears that it's identifying those characters as spaces, just judging by chr(13),chr(10) resulting in a double space. Let me know what you think. Cheers, James Quote Link to comment
Pat Stanford Posted May 6, 2011 Share Posted May 6, 2011 I just copied and pasted your script above into a new blank VW document. I get two lines of text in VW2011. In VW2010 I get the same result you do. Sorry, I think you are out of luck until you upgrade. Quote Link to comment
James Russell Posted May 6, 2011 Author Share Posted May 6, 2011 Oh, well that's boring. Thanks for testing it never the less Pat. Cheers, J Quote Link to comment
herbieherb Posted June 20, 2019 Share Posted June 20, 2019 Any news on this? Im also trying to write multiple lines of text into the same message box. None of the above worked for me. Quote Link to comment
MullinRJ Posted June 21, 2019 Share Posted June 21, 2019 VW 2011 was the first version that accepted Carriage Return (CR) characters in the Message Window; and Windows and Mac have different codes to accomplish this. The Mac uses CHR(13) for a CR while Windows uses CHR(13), CHR(10). So for Mac: Message('Line 1', chr(13), 'Line 2'); and Message('Line 1', chr(10), 'Line 2'); and Message('Line 1', chr(13), chr(10), 'Line 2'); and for Windows: Message('Line 1', chr(13), chr(10), 'Line 2'); all produce the same output. ______________________________________ x + VectorScript Message ______________________________________ Line 1 Line 2 ______________________________________ HTH, Raymond 2 Quote Link to comment
Mayk98 Posted July 3, 2019 Share Posted July 3, 2019 I'm using Win 10. Here is some info about your question. If you want to force a new line in a message box, you can include one of the following: The Visual Basic for Applications constant for a carriage return and line feed, vbCrLf. The character codes for a carriage return and line feed, Chr(13) & Chr(10). 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.