Hi,
Does anyone know how to insert a line feed in the text of a logical component (set_description) with python4Capella?
I tried :
model.start_transaction()
LC1.set_description(‘TEST \n TEST’)
model.commit_transaction()
It doen’t work
Thanks
dvd
Hello
You might want to share it in the dedicated sub forum (scripting)
What about the error message?
And, what do you see when you do a “print(LC1)”?
You may try with print(‘TEST \r\n TEST’)
Hello,
Sorry for the bad sub forum! I will ask may further questions in the scripting sub forum !
‘TEST \r\n TEST’ doesn’t work
There’s no error message → it is just just written ‘TEST TEST’ in the description field without line feed but also without ‘\r\n’ litteral expression!
Any other idea?
Should I ask the same question in the scripting sub forum?
Thank you for you reactivity!
dvd
Actually, “TEST
TEST” should work much better…
Hi,
LC1.set_description(’ TEST
thanks
dvd
really funny these special characters!!
the characters for discribing a line feed is < and p and >
isn’t it?
This one would have also worked well probably:
HTML br tag (w3schools.com)
And that’s answers your question about < and > tags,
is for paragraph by the way. You can learn about tables, titles, images tags later aswell.
yes indeed, it seems to be even more suitable .
thank You KaBe.
See you on the forum!
dvd
Ah I did not see my comment was not rendered properly. What I suggested was “TEST<br/>TEST”
So, Thank you too, Stephane!