question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jason Lightfoot commented

Text Format?

Hi Team,

I am able to write text in format "Jim Kane". How to write text in next line as below:

"Jim

Kane"

Thank you!

FlexSim 21.0.10
textnext line
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented
print("Jim\nKane")

The escape character '\' followed by:

  • n - newline
  • r - carriage return
  • t - tab
  • " - quotation mark

So

print("\"Jim\nKane\"")

gives what you typed in your question.

· 7
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·

Hi @Jason Lightfoot,

I am using display object to print the text on screen. It is not working in the way you suggested. Also "\n" is getting disappear automatically.

Can you look at it here?

1654168804647.png

Text_NextLine_Check.fsm

Thank you!


0 Likes 0 ·
1654168804647.png (36.1 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Ankur A3 commented ·

No that doesn't work in a text visual tool. Consider using the draw code and drawtext() instead.

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Jason Lightfoot ♦♦ commented ·
Hi @Jason Lightfoot,

I don't have any idea how to use it to write in similar fashion as text visual tool?

Can you show me in model?

Thank you!


0 Likes 0 ·
Show more comments