07-16-2023 08:16 AM
07-16-2023 09:05 AM
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
07-17-2023 04:17 PM
07-17-2023 07:10 PM
That's pretty cool. Well, very cool.
07-17-2023 07:53 PM
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
07-17-2023 08:16 PM
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.
07-18-2023 02:00 AM
Could you paste the ZIP here too, please?
I'm not on lavag forums and can't download it...
07-18-2023 02:23 AM
07-19-2023 02:06 AM
Any chance to get this in 2019 version? 😄
07-19-2023 10:03 AM
Saved this for 2018, but I didn't test it