07-09-2010 10:32 AM
I am doing development work on a laptop on Win XP and using LabVIEW 2009 with service pack 1. When I copy the code to the target system, my block diagrams are changed and no longer fit the screen. Much of the code is spread out, mainly down. The target system is running Windows 7 and also has LabVIEW 2009, SP 1.
I notice that any constants that are clusters are expanded when copying the code to the other system. I've gone in and turned off the autosizing for these clusters but they are still expanded. I like to shrink them to a small size for saving space.
I've gone through and manually re-adjusted the block diagram on the target system, but when I copy it back to my development laptop, the same thing happens again. This is not an acceptable way to develop code and it has caused a real problem to proceed. I'm contracting this work and must develop this code offsite. Can anyone please help me with this? I can't keep restructuring my block diagrams every time I copy the code from one system to the other.
07-09-2010 11:26 AM
I have seen the same thing myself and have been told that changing the font on my Windows 7 machine will fix that.
To what style font ? Don't know.
Which Windows set-up screen ? don't know.
Will it work ? Don't know did not try it yet.
So that is what I have read and that is all that I can offer.
Ben
07-09-2010 11:51 AM
Thanks Ben. I will look into the font situation. I'm new to Win 7, so it will be a learning experience for me as well. I'll keep you posted if it works.
07-09-2010 11:54 AM
@ParkCityLV wrote:
Thanks Ben. I will look into the font situation. I'm new to Win 7, so it will be a learning experience for me as well. I'll keep you posted if it works.
Same here.
LV 2009 was my excuse to buy the new laptop and was sorta disapointed that LV did not like the default fonts. I tried to report this a bug but nobody (ahem) at NI could duplicate (cough cough cough) the problem...
So please keep us updated.
Ben
07-10-2010 12:18 AM - edited 07-10-2010 12:28 AM
Windows XP used Tahoma size 8 as its basic system font. When MS came up with Vista, they changed it to Segoe size 9. I'm not sure what Win 7 is, but I think it is the same as Vista. That font change, and certainly font size change seems to be the underlying cause for block diagrams changing their appearance. (And for front panel controls and labels as well.)
LV seems to use the Windows system font as its default font. Interestingly, it seems like the font sizes in LV are something like size 12, 13, 14, 15. I think a size 9 is equivalent to a size 15, but I'm not sure about the comparisons. (Check out this thread.)
There are a few things you can do to try to make one system look more like the other.
1. Go into the Windows screen settings. In Vista, right click desktop, Personalize. Window color and appearance. Open classic appearance properties. Try changing the color scheme from Windows Aero, to something like Windows Classic or Windows standard. They both use Tahoma 8.
2. Or same as Step 1, but go further into Advanced button. Pick on any option that uses font such as Menu, Message Box, Active or Inactive Title Bar and change the font there. I'm not sure which of the items that has a font setting is the key one.
3. LV uses 3 fonts called Application, System, and Dialog. I think each of those map to one of those Windows options, but I'm not sure which goes to which.
4. In LV, Tools/Options/Environment has a subsection called Fonts. Those 3 basic LV fonts are selectable there. There is also a checkbox for me which is checked and says to use default. If you uncheck that checkbox, a Font Style button becomes enabled. You go in there and you can choose fonts and sizes. And the Application, System, and Dialog fonts as well as all the usual fonts names (Arial, MS Sans Serif, Greek, ....) are selectable along with fonts sizes. Play around in there. The whole section is very confusing, and I have no idea how it works. I recommend going to this idea A better way to specify (default) fonts and putting in a vote. Also this idea, Fix font behavior between windows versions, platforms & executables, deserves some love.
5. Some of these settings can also show up in your LabVIEW.ini file.
FPFont = "0" 15
BDFont = "0" 13 (I think the "0" means app font, "1" means system font, and "2" means dialog font)
Also,
appFont="Tahoma" 13
systemFont="Tahoma" 13
dialogFont="Tahoma" 13
(And if necessary, put these in your built application's .ini file)
As you can see, there are a lot of different things going on and they also seem to conflict with each other. I starting stumbling on the block diagram issue between working on my app on XP at work and on my Vista machine at home about 6 months ago. I think my problem actually started with the front panel when I was trying to align labels, and use some arrow head decals on boolean buttons. I think I did the customization of buttons in a couple different ways (because I did some, came back later to do others, and couldn't remember exactly how I did it.) As a result some decals looked different than others when I changed machines. And I swear going from XP to Vista, or Vista to XP the problem got both worse ways rather than let's say larger one way, and smaller the other way.
Replying to your message is about as much to me trying to combine all the pieces of knowledge I've stumbled across over the past months and year as it is for trying to help you. Hopefully, this information gives you some places you can look at and play with. (I bet #1, would be a quick, easy way to solve your immediate problem, but I haven't really tried it myself to be sure.)
I hope someone from NI who has a better understanding than me about these font issues could jump in and correct any mistakes I made, or add anything I might have left out. What we really need is some sort of "nugget" or National Instruments white paper that really explains all of this in ways we can use rather than us stumbling around in the dark doing things trial and error to figure it out. Generally, any changes to the .ini files require you to shutdown LV and restart it to take effect which can take a couple minutes. And considering all the various combinations of things that can be done above, your talking about dozens of possible restarts, and sending .vi's between two different PC's with two different operating systems, before figuring these things out.
07-10-2010 05:10 PM
Hey Ben,
I got it to work. The cluster constants in my block diagram would expand full size when I copied the code to the other system. This caused the loops and cases they were in to also expand causing the overall block diagram to expand. I went through and turned off the autosizing for these cluster constants and they did not expand when I copied my code. I had tried this before, but I guess I did something wrong. With the autosizing of my constants turned off I can now copy my code and not have it change my block diagram. Hope this works for you too.
07-10-2010 05:20 PM
Thanks for your help Ravens Fan. I had tried changing the font sizes for all the different LV fonts, but that didn't fix the problem. I did get the problem corrected - see my previous post. I agree with you that it would be nice for NI to write a white paper or something about the use of fonts with LV. Like you, I figure these font things out by fumbling around with it. I wasn't aware about the INI file settings. Thanks for that piece of advice. If I do have font issues in the future, that INI file advice may save me some time. Thanks again for your help.