LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 7.0 resizes controls when compiled

Solved!
Go to solution

This is annoying.  I've got a few controls (some strict type, some free) that I changed the default height of the array element.  When in source, it looks fine.  I compile, and it goes to what looks like the default height.  This is unacceptable.  Anyone know why this is happening?

 

I've attached pictues of what is happening.

 

Thanks,

 

 

Adrian

Download All
0 Kudos
Message 1 of 14
(3,562 Views)

by any chance have you set the property (see the image below) or is the resolution of the PC where you have installed the application is diferent from the one you used to develop the code?

 

 

 

 

Regards
Guru (CLA)
0 Kudos
Message 2 of 14
(3,527 Views)

Thanks for your responce.

 

No, I've not set those.  Checked them long before.  Also, first saw the problem on the my developer machine, so it's not a Windows DPI or resolution issue.

 

Any other suggestions?

 

0 Kudos
Message 3 of 14
(3,502 Views)
Adrian-

I hav ea few more questions for you about your application:

1. Is this a running VI or an exe?
2. It appears the physical size of each object remains the same just in a different location.  Is this true?
3. Have you tried using property nodes to set the location of each element?
4. Do you see this same behavior on newer versions of LabVIEW?
5. If you open a new VI and copy/paste the contents of the original into the new VI and save it.  Does the same behavior occur?
6. Does this behavior only happen on this one particular VI or others too?
Regards,

Mike S
NI AE
0 Kudos
Message 4 of 14
(3,480 Views)
A1:

Source = VI

Compiled = exe

 

A2:

Physical size is changing for some, and not for others.  The ones that are changing are the ones I am referring to, that is the arrays.

 

A3:

No, position and size are changing, so just repositioning the controls will not matter.

 

A4:

Don't have a newer version of LV to play with.

 

A5 & A6

Probably, instead of  cutting and pasting, I just made a junk VI.  It contains onlyan array on its front panel.  The array consists of simple strings that have had it's height reduced. 

 

Attached are the samples of this experiment in one PNG.

0 Kudos
Message 5 of 14
(3,475 Views)
Adrian-

I tried to reproduce this on my end and there is no direct property node to programmatically set the height of a numeric indicator inside an array.  However, take a look at the screen shot for a way to do this.  Then you can set the height (in pixels) so it will always be the size you expect it to.

When trying to reproduce this in LabVIEW 2009, this is not same behavior.  If you are interested in upgrading, please let us know.

Regards,

Mike S
NI AE
0 Kudos
Message 6 of 14
(3,466 Views)

Please don't upload a 2 MB bitmap image and slip it through the filters by calling it a .png.  Changing the extension doesn't change the file format or the size of the file.Smiley Mad

 

 

Any chance that the size of the numerics or the font is being defined by a setting in the LabVIEW.ini file?  If that setting is not the same or present at all in the application's .ini file, then the size of the fonts and perhaps the control itself would change in the .exe environment.

 

0 Kudos
Message 7 of 14
(3,459 Views)

I would be very interested in upgrading, but it isn't going to happen anytime soon.  We have too much invested in the current code base and not enough time to upgrade it. 😞

 

When I tried out that code you posted, it didn't work.

Error 1057 occurred at To More Specific Class in junk.vi

 

Possible reason(s):

LabVIEW:  Type mismatch: Object cannot be typecasted to the specified type.

 

However, I wasn't trying to set the property, I was trying to figure out why this is happening, since shouldn't the compiled version store the attributes of all the controls on the front panel so it shows up as initially laid out?

0 Kudos
Message 8 of 14
(3,434 Views)

LOL, yeah, you can thank M$ Paint for that.  Didn't realise that happened until it was too late.  I usually use GIMP.

 

Where is this LabVIEW.ini file of which you speak? I know that the.ini file that is generated by the app on startup is empty.  I found one in "C:\Program Files\National Instruments\LabVIEW 7.0", of which I copied the contents to my app's.ini without any difference.

0 Kudos
Message 9 of 14
(3,432 Views)

That would be the one.  I would browse through it to see if there is anything defined in there for fonts.

 

Not saying that would fix it, just a thought that crossed my mind I thought was worth investigating.

0 Kudos
Message 10 of 14
(3,423 Views)