LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to resize front panel to fit around rectangular object?

Solved!
Go to solution

So I have a rectangular object on my front panel that has the dimensions 732 x 576. My front panel meanwhile is around 1048 x 976. When I run the front panel I see my object, but I also see all the blank grey space around it that constitutes the rest of the front panel that my object did not take up. I want all this grey area gone, so that I only see the object on my front panel and nothing else.

 

And I have tried changing the dimensions of the front panel through the vi properties, but that has no effect for some reason.

 

For your consideration, I need this effect because I'll be running this singular object front panel as a sub panel in a larger vi, and I don't need all that extra grey area seen when I run it as a sub panel.

0 Kudos
Message 1 of 7
(3,583 Views)
Solution
Accepted by topic author ShogunOrta

When you installed LabVIEW, you should have also installed VIPM, the VI Package Manager (look in Programs for VIPM, VI Package Manager, or a folder called JKI where it might be living).  If you don't have it, it is a free addon you can download after doing a web-search for VIPM (it comes from JKI -- Jim Kring (JK) is the author of one of the best LabVIEW texts, though he's overdue for a new Edition ...).

 

Since the early days of LabVIEW, there has been a group of users to belong to LAVA (LabVIEW Advanced Virtual Architects).  They've developed a package called the OpenG Toolkit that has a utility, Fit VI Window to Largest Decoration, that will do just what you are describing.  You put a Decoration (I use a Raised Frame) around what you want your Front Panel to show, put this VI at the beginning of your code, and when the code runs, the Front Panel "snaps" to the Decoration and shows only it and whatever is inside it.

 

To get it, start VIPM and configure it for your version of LabVIEW (you need to enable TCP/IP connectivity, which you do by opening LabVIEW, clicking Tools, Options, VI Server, and putting a Check in the TCP/IP box).  VIPM will open the LabVIEW Tools Network and show you Tools you can use (explore later!).  For now, go find OpenG Toolkit and install only that -- it will bring in most of the other OpenG Tools.

 

You'll now find on your Block Diagram Palette set an OpenG tab.  Look in the first set of tools, OpenG Application Controls, for Fit to Largest Decoration.  Enjoy.

 

Bob Schor

Message 2 of 7
(3,566 Views)

Maybe you want something like this:

vis.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 7
(3,526 Views)

Thanks for the reference! Wow, who knew you had to go through so many hoops just to resize the front panel. Seems like it would be a simple enough operation. Thanks again.

0 Kudos
Message 4 of 7
(3,511 Views)

Hey Bob, so maybe a little bit of a jump of the gun. I've found VIPM and installed it, and I found OpenG Toolkit as an available download, but... It only seems to be compatible with earlier versions of Labview, 2012 and before. But not for 2015. I tried installing every old version of OpenG, but it didn't seem to complete the installation. I assume there are other packages available on the Labview Network that do similar things as the OpenG Toolkit, and I'll definitely check that all out. But for now, is there any quick work around to implement OpenG Toolkit for Labview 2015? Thanks again.

0 Kudos
Message 5 of 7
(3,473 Views)

The latest OpenG Applications Control package is 4.1.0.7 and is compatible with LabVIEW 2009 or newer.  I have it installed in LabVIEW 2017.  Not sure why it doesn't want to install, what kind of error are you seeing?

0 Kudos
Message 6 of 7
(3,471 Views)

That's the weird thing. I get no error at all. It starts downloading the package and I can see the dialogue working at the bottom of the VIPM. But then nothing happens. It just says "ready..." at the bottom and no errors or anything happened. 

 

And about the 4.1.0.7 version, the one I saw seemed to say it was only compatible with 2012 and earlier. But maybe that was for 4.1.0.6. I'll take a look.

0 Kudos
Message 7 of 7
(3,468 Views)