09-25-2015 07:55 AM - edited 09-25-2015 07:55 AM
Anyone successfully integrated a 3rd party GUI (e.g Java/Swing) with a LabVIEW back end? I have an app in LabVIEW that has evolved to the point that the limitations of the LabVIEW GUI have become painful.
09-25-2015 08:00 AM
@ToeCutter wrote:
I have an app in LabVIEW that has evolved to the point that the limitations of the LabVIEW GUI have become painful.
My first suggestion is to research other LabVIEW UI techniques. Good UIs are one of LabVIEWs weaker points, but I've made some very elaborate UIs and have yet to have a challenge that LabVIEW couldn't do with some cleaver coding and reuse tools.
That being said what I've seen people in the past do is build a DLL in LabVIEW, then sometimes write a wrapper DLL (not quite sure when this is needed) so that their LabVIEW code can be called from any language. Aside from that LabVIEW has .Net and ActiveX containers, not sure how those could be used with Java/Swing (whatever that is)
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-25-2015 10:33 AM - edited 09-25-2015 10:34 AM
Mostly what Hoovah says. Unless you need to implement specific gimmick features such as a Ribbon (
) it is mostly a question of doing a bit more than just dropping a control on the front panel and expecting it to mimick specific features exactly such as you see in some high volume applications from Adobe and friends. Swing in particular doesn't strike me as the benchmark of übercool and easy to design UI widget interfaces. One advantage of widget libraries like Swing is that they are more layout centered which makes dynamically resizing UI's simpler to manage, at the cost of a somewhat arcane look and feel that doesn't really look better and less recognizable than LabVIEW.
If you really want to go with a different IDE and/or UI widget, the only reasonable way in my opinion is to isolate the application logic into library functions, create a DLL or .Net assembly from it and then call it from your UI application. Anything else like embedding a different UI inside a LabVIEW UI is only going to create even more work in trying to design the interfaces between the two and has a high change of falling apart with a new OS or IDE version/widget library.
As to the question what Swing is, it is the higher level UI widget library in Java besides the AWT one (and several other 3rd party widget libraries for Java).
09-25-2015 10:46 AM
@rolfk wrote:
Unless you need to implement specific gimmick features such as a Ribbon (
)
Oh that does sound like a fun challenge. I can think of a few ways to do it, I'd probably start with some toolbar code I made a while ago for drawing icons. It supports resizing and collapsing icons into a smaller vertical list if the window gets too small. I really enjoy LabVIEW UI development, and making UIs and UX that people don't realize, or can't believe, that it is LabVIEW. But as I said one major weakness of LabVIEW is UIs so I can see why you might be interested in other languages that do UIs well. If you come up with a good way to do integration with Swing be sure and post it here, or the user interface community.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-26-2015
12:25 PM
- last edited on
04-12-2024
09:16 AM
by
Content Cleaner
@Hooovahh wrote:
@rolfk wrote:
Unless you need to implement specific gimmick features such as a Ribbon (
)
Oh that does sound like a fun challenge. I can think of a few ways to do it, I'd probably start with...
Or take a shortcut - https://forums.ni.com/t5/UI-Interest-Group-Blog/Creating-an-Office-2007-like-Ribbon-in-LabVIEW/ba-p/...
That specific example (which probably doesn't implement all of the important features of the ribbon anyway, but it's been years since I looked at it) aside, another option is to write your UI as a web page (with whatever JS UI framework you like) and have the connectivity to the LV backend through something like a web service or websocket. There is no shortage of example for things like that online.
09-26-2015
01:58 PM
- last edited on
04-12-2024
09:17 AM
by
Content Cleaner
If you are trying to create GUI which should not resemble LabVIEW, and you do not require any additional functionality of UI objects, except of LabVIEW controls already have, you can check out several UI controls kits available in LabVIEW Tools Network.
Below I have attached some screenshots with most of controls included in the kits.
Space UI Controls kit. (Will be available in LabVIEW Tools Network early October)
Harmony UI Controls kit. https://www.ni.com/en-us/shop/product/harmony-ui-controls-toolkit.html
Scarlet UI Controls kit. https://www.ni.com/en-us/shop/product/scarlet-ui-controls-toolkit.html
09-27-2015 02:22 PM
Hooovahh wrote:
Aside from that LabVIEW has .Net and ActiveX containers, not sure how those could be used with Java/Swing (whatever that is)
So I also didn't know what Java/Swing was, so off to the Web. I'm not impressed -- what I saw (looking at some tutorials) looked suspiciously like LabVIEW Front Panels and Controls. They had Text Boxes (a.k.a strings), Buttons, Sliders, etc. Plus LabViEW controls are fairly customizable. And it's all LabVIEW -- no need for .DLLs, library calls, multiple languages, etc. K.I.S.S. (where the final S is, of course, Sailor).
BS
09-28-2015 02:39 AM - edited 09-28-2015 02:41 AM
Just to add to this one more point: The controls as shown from RAFA Solutions in the earlier post Space UI, Scarlet UI, and Harmony UI are all mostly smartly customized LabVIEW standard controls. This kind of customization of LabVIEW controls has been more or less possible since around LabVIEW 3.0. It's not trivial and the custom control editor has its quirks that can make you pull your hairs at times, but it's been there and possible since almost the start of LabVIEW. Many people have tried to create UI widget libraries with particular themes. www.lavag.org has several freely available collections of such controls in the code repository.
Claiming that LabVIEW doesn't support creating fancy UIs is mostly a combination of not knowing about the custom control editor and sometimes lazyness.
09-28-2015
03:20 AM
- last edited on
04-12-2024
09:17 AM
by
Content Cleaner
Yeah, I quite enjoy spending the time to figure out new ways to customise LabVIEW UIs - there's a lot of good/inspirational content over on the UI Interest Group on the NI Community: https://forums.ni.com/t5/UI-Interest-Group/ct-p/7019
Failing that - some sort of network communication (e.g. JSON over TCP/IP) would allow you to communicate between your LabVIEW application and a user interface pretty easily. One of my areas of interest is with WebSockets to have a browser as the user interface.
09-28-2015 05:03 AM
Thanks boys- all constructive comments so you earned yourselves a K+ each.
I'm no stranger to customising the LabVIEW UI myself, although I must say it was a painful experience. Working with borderless controls, especially when layered, is a major pain.
However, for what I'm doing now I don't think LV customisation really cuts it. I want a big geographical map with the option to click on entities and customise them. The XY graph I have at the moment doesn't really cut the mustard. I'm thinking of doing a '2D in 3D' with the 3D picture control, but I still can't help thinking it would be easier in something other than LV. The Java/Swing thing was just an example. Not saying it's an optimal solution.