LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use line feed in PlotText?

Solved!
Go to solution

Hello,

 

I was wondering if I could print two lines just below each other on a graph control using PlotText and a line feed within the text string? Unfortunately, I wasn't able to do so using 'bla\r bla' nor 'line1\n line2' ... Is there such a possibility?

Thanks,

Wolfgang

0 Kudos
Message 1 of 8
(3,784 Views)
Solution
Accepted by topic author Wolfgang

Hi Wolfgang,

unfortunately the current PlotText function does not support any escape characters. This is a known issue and should be resolved with the next major CVI release. I am sorry there is no better solution for now.

 

Best regards,

Peter

--
Peter A.
Field Sales Engineer, NI Germany
0 Kudos
Message 2 of 8
(3,768 Views)
Thank you!
0 Kudos
Message 3 of 8
(3,763 Views)
In case you still want to plot two lines of text, you may find useful GetTextDisplaySize ( ) function, which returns the dimensions in pixels of a string in a given metafont. The text height can permit you to stack one text immediately below the other. Keep in mind that PlotText accepts coordinates in axis units, not in pixels, so you need to convert text height in pixels in the appropriate value in graph units.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 4 of 8
(3,761 Views)

Thanks Roberto for sharing this hint!

Peter

--
Peter A.
Field Sales Engineer, NI Germany
0 Kudos
Message 5 of 8
(3,756 Views)

@PaSB wrote:

.... This is a known issue and should be resolved with the next major CVI release.


 

Nothing has changed so far, it's still the same in CVI2010 Smiley Sad. Is it going to be fixed as announced?

0 Kudos
Message 6 of 8
(2,968 Views)

Hi Wolfgang,

 

I know that you're registered as a beta user. Have you tried this in the most recent beta?

 

I apologize for the incorrect information that you received, back in 2009. There was no commitment, at the time, of adding this feature in the "next major CVI release". I'm sorry that I didn't catch and correct this.

 

Luis

Message 7 of 8
(2,959 Views)

Hi Luis,

 

in PlotText the line feed character seems to work in the 2012 beta Smiley Happy

 

Thanks for sharing this news! You can add it to the 2012 readme - I haven't seen this announcement anywhere

0 Kudos
Message 8 of 8
(2,939 Views)