iLogic MessageBox

iLogic MessageBox

Anonymous
Not applicable
11,793 Views
3 Replies
Message 1 of 4

iLogic MessageBox

Anonymous
Not applicable

Hi Folks,

I hope someone can help me out?....

I'm puzzled as to how to get more than one line of text into a Message Box if this is possible.

 

 

Thanks 

0 Likes
Accepted solutions (2)
11,794 Views
3 Replies
Replies (3)
Message 2 of 4

jingyi.liu
Alumni
Alumni
Accepted solution

For VB language, vbcrlf stands for carriage return, so you could try it as below:

 

 

My_Message="Line1"+vbCrLf+"Line2"

MessageBox.Show (My_Message, "My Message")

 

 

good luck!



Jingyi Liu

Inventor Product Manager
Message 3 of 4

Curtis_W
Consultant
Consultant
Accepted solution

Hi Fleagle8t,

 

In addition to jingyi.liu suggestion, you will often see & vblf & used to get the same result:

 

MessageBox.Show ("Line1" & vblf & "Line2", "My Message")

 

As an added note, I often like to use a space and underscore in the code to add a line return in the code, for example:

 

MessageBox.Show ("Some text here used for Line1" _
& vblf & "More text here used for Line2" _
& vblf & "More text here used for Line3" _
& vblf & "" _ 'nothing for line4
& vblf & "More text here used for Line5", "My Message")

 Autodesk Inventor iLogic Wrap Line MessageBox Multiple Line Message Box.png

 

Using vbNewLine will work also:

 

MessageBox.Show ("Some text here used for Line1" _
& vbNewLine  & "More text here used for Line2" _
& vbNewLine & "More text here used for Line3" _
& vbNewLine & "" _ 'nothing for line4
& vbNewLine  & "More text here used for Line5", "My Message")

 I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com

EESignature

Message 4 of 4

Anonymous
Not applicable
Thanks Jingyi.liu and Curtis you have really helped me out you're Stars !! ;0)
0 Likes