LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is that possible to rotate text as attached picture? in labview?

text rotate.png

0 Kudos
Message 1 of 10
(1,587 Views)

The problem is not the "rotation", but the "rendering".  By "text", I assume you mean the data type LabVIEW calls "Strings", which are represented (internally) as an array of U8 (or possibly U16 in some cases) to correspond to (typically) the ANSI encoding (also called ASCII) of numerals, punctuation, upper and lower case letters, and a small subset of other symbols (±, µ, °, ²) and accented letters.  PCs (and Macs) are designed to render this data type in horizontal forms -- to do more complex type layout generally requires special purpose software that can take the form of the character and transform it to flow other than horizontal.

 

LabVIEW doesn't do that.  It is an "Engineering Workbench", not a text processor.

 

Having said that, you could (probably) create an image of your text string, rotate the image, and get LabVIEW to display your image.  Another thing to do would be to let some other program process your strings and return an image to you, and you could use, for example, the Report Generation Toolkit to generate a Report with the Image on top and the rest of the Report below.  Since your example looks like a SpreadSheet, I'd suggest creating an Excel Workbook, where the WorkSheet imports a Picture.  [Hmm, maybe Excel is clever enough to take your Array of Strings and make slanted column labels -- seems to me that this might be possible with its columnar bar graphs, which I think I've seen the mother of our children produce ...].

 

Bob Schor

0 Kudos
Message 2 of 10
(1,571 Views)

That's pretty cool.  Well, very cool.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 10
(1,467 Views)

Well, I'm also amazed, but it kind of proves my point -- you can go outside the LabVIEW environment and import .NET tweaks to make nice-looking reports, but it isn't (and probably shouldn't be) part of the LabVIEW environment, which is designed to facilitate engineering.

 

Bob Schor

0 Kudos
Message 5 of 10
(1,461 Views)

Thanks for the Kudos!

 

I'm hoping that we can continuously push on LabVIEW to be a better product.

I don't like the notion of being complacent that LabVIEW doesn't need to natively support rotated text because we might think that type of thing is only required for generated reports.

In my use-case, I wrote this code specifically so that I could build a better front end for a large control system.

A really good LabVIEW GUI is one where the user doesn't realize that they are using a LabVIEW GUI.


Ideally, we'd get this type of native support from the NI team.  I'd love to see rotated text and anti-aliasing directly supported in the 2D picture control.
Or, I'd love to see a native rotated text option on table controls.

Until that happens though, there are ways for the community to expand the language together.
I really should have turned this into a Qcontrol, which would encapsulate/abstract all the difficult stuff away from the user.

Message 6 of 10
(1,455 Views)

Could you paste the ZIP here too, please?

I'm not on lavag forums and can't download it...

0 Kudos
Message 7 of 10
(1,435 Views)

Here you go:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 10
(1,425 Views)

Any chance to get this in 2019 version? 😄

0 Kudos
Message 9 of 10
(1,335 Views)

Saved this for 2018, but I didn't test it

Message 10 of 10
(1,293 Views)