Create multi-line comment in Mechanical tree ?
Landon Mitchell Kanner
Member, Employee Posts: 299
✭✭✭✭
Looking for a way to write comments on multiple lines in a single comment object in Mechanical. I have tried:
commentObj = ExtAPI.DataModel.Project.Model.Geometry.AddComment() commentObj.Name = 'NewName' commentObj.Text = " comment1 \n comment2 \n comment3" print commentObj.Text
When executing the above script, the comments are printed on new lines in the console, but in the comment object they remain on a single line:
Is there a way to print on multiple lines using AddComment()?
Tagged:
0
Best Answer
-
The comment object displays text in HTML format. You could create multi-line comment, e.g., by using html <br> element:
commentObj = ExtAPI.DataModel.Project.Model.Geometry.AddComment() commentObj.Name = 'NewName' commentObj.Text = 'comment1 <br> comment2 <br> comment3'
0