Jump to content

Building VIs into a package expands controls and BD elements


Recommended Posts

Hi,

I'm using VIPM to build my device drivers and project templates into vi packages which are then used by other developers. During the build process some of the front panel elements get blown up as if the text size was changed and then reduced again but the size of the control doesn't return to its original size. A similar thing happens on the block diagram. Some structures (set to auto-grow) end up wider in the package than in their original source as if a BD element inside the structure was increased in size and then decreased again. While that's not a terrible thing to happen in the drivers, it really kills the templates because the first hour is spent to fix up cosmetics...

I've attached some screenshots.

Anyone know how to fix that?

bd.PNG

control.PNG

Link to comment

I've built lots of packages and never seen anything like this.  In Windows do you have any weird scaling settings on your display?  Right click the desktop and go to Screen Resolution, then click Make Text and other items larger or smaller.  I keep this setting at 100% to avoid some graphical issues.  The next thing I might look into is the font settings in your LabVIEW.ini, and possible if you are using any custom fonts in your front panel controls.  First make sure your display settings are 100%, and then I'd create a fresh LabVIEW.ini and try again but again these are just guesses.  You can also try to build on another machine, or a VM and see if it works there.  And lastly JKI has revamped their forums and appear more committed to customer support on them.  If you can easily reproduce it you might want to post it there.

Link to comment
On 5/17/2018 at 10:35 PM, hooovahh said:

In Windows do you have any weird scaling settings on your display?

I do. Code is developed on a surface tab with high DPI (200%) screen plus a 1080p 2nd monitor. I wonder if it matters which screen the BD was on last... Unfortunately, my eyes are too old to run the tab at 100%

On 5/17/2018 at 10:35 PM, hooovahh said:

You can also try to build on another machine, or a VM and see if it works there.  And lastly JKI has revamped their forums and appear more committed to customer support on them.  If you can easily reproduce it you might want to post it there.

I'm already building on a different machine - in fact, I've tried two different ones. Same mess for both.

The only time I don't get a problem is when I build locally, but that's not an option since all our builds go through Jenkins.

On 5/18/2018 at 1:05 AM, Zou said:

Don't use application font, or dialog font, choose a specific font, for example: Segoe UI

I do use application font but I was hoping not having to go through thousands of VIs to change their font setting. But it seems that's the only way :(

Has anyone scripted that?

Thanks guys

Link to comment

From a quick poke through the property nodes, I could only find a way to script label fonts (of FP controls, BD nodes, etc.). I couldn't find a way to set fonts at the VI level.

This post suggests lots of font settings aren't available through scripting: https://forums.ni.com/t5/LabVIEW/VI-Scripting-in-LabVIEW-2012-change-font-size-of-tab-control/td-p/3011091

Expansion behaviour that depends on screen settings is something that I'd consider a bug. It will only become more prevalent as the screens become more varied in DPIs. Would you be willing to report this to NI? I doubt we'll see a change in current-gen LabVIEW, but hopefully NXG will be protected from this.

Link to comment
15 hours ago, ThomasGutzler said:

I'm already building on a different machine - in fact, I've tried two different ones. Same mess for both.

But do those machines have the same scaling settings in Windows?  This is a bug clearly, but I think if you can control the scaling settings on the deployed machine, then you can just have the building machine match.  For me I just make sure all machines I work on and deploy to are set to 100%, too many weird things like this happen when they aren't.

15 hours ago, ThomasGutzler said:

Unfortunately, my eyes are too old to run the tab at 100%

No problem just get a couple of 65'' TVs for your computer monitors...of course that makes a some new problems.

Link to comment
On 5/21/2018 at 9:36 AM, JKSH said:

From a quick poke through the property nodes, I could only find a way to script label fonts (of FP controls, BD nodes, etc.). I couldn't find a way to set fonts at the VI level.

No me neither.

Looking at the BD example, it seems the in-place structure was blown up by the Bundle by Name node. Is it even possible to change the font used in those?

Quote

Expansion behaviour that depends on screen settings is something that I'd consider a bug. It will only become more prevalent as the screens become more varied in DPIs. Would you be willing to report this to NI? I doubt we'll see a change in current-gen LabVIEW, but hopefully NXG will be protected from this.

Yeah, I'll report it.

9 hours ago, hooovahh said:

But do those machines have the same scaling settings in Windows?

All build machines have scaling set to 100%.

It's only my laptop screen that is set to 200% and I can't take that out of the equation. All our developers have high DPI (200%) laptops and regular (100%) 2nd monitors.

I can't edit the scaling on the build machine because it's headless and the setting is grayed out when remoting in.

Edited by ThomasGutzler
Link to comment

I do use application font but I was hoping not having to go through thousands of VIs to change their font setting. But it seems that's the only 

Do it programmatically.  Here is what I would do:

Change LabVIEW font option to Segoe UI or any specific font, make it panel default.

Programmatically open each VI, and simulate a Ctrl-A to select all, then simulate a Ctrl-4 to set font to Current Font.

Save the VI.

 

 

Edited by Zou
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.