use of ini files

Hello

I have a question about the customs with the ini file.

I would like to know what is the common good, for now, I create a big bunch of cluster that contains parameters of

program (by using the openg palette).

The values in this file normally do not change much, but sometimes they must and could be changed by the user and others only by developer.

However if he knows he can do dangels directly with txt Editor.

So I have to do two ini files or I make a confusion between the ini file (ex name path, ports, devices) and the file parameters (number of point, stability... criteria?

What is the common habit of programming?

When necessary make you changes on an ini editor txt file or do you develop a vi to re - write?

Best regards

Tinnitus

Tinnitus,

I'm not sure that there is a 'standard' for the .ini files.  In some cases, I think it's a good idea to divide the information into multiple .ini files.  One to contain things that would need to change only the developer and the other to hold the things the user may need to change.

I always develop a vi to create the .ini file the first time.  That way if I need to provide an interface to change settings, I.  An advantage of this is that you can protect against stupid errors that may occur in the text editor.  You can build into a Global engine / functional Action that supports the .ini in general.

I also suggest that you take a look at the Configuration variant OpenG screw file found here http://wiki.openg.org/Oglib_variantconfig.

Tags: NI Software

Similar Questions

  • using the .ini file created by EXE

    First of all I would like to say that I have a thorough knowledge of the .ini files and the need for them.  My question is related specifically to the .ini file that is created with the executable.  I searched the forum but have not found any instance of my question specifically.  After installation, the .exe and .ini are placed in my working directory in Program Files, which I expected.  The .ini file that is created is attached.

    Now, I would like to point to a different .ini that stores control settings.  I did it in the App generator under Advanced > Use Custom Config File.  That's fine and dandy, but the network, web, settings etc that have been created in the original .ini does not get included in my new .ini.  If my option is to use an .ini file separated with my control as well as created by the .exe parameters.  This seems redundant.

    My question is: does nothing my executable with the .ini file that is created when it starts to run?  I'd be OK NOT to have attached items if I wanted to point to a custom .ini file?  Why create an .ini with these specific settings file if the .exe does nothing with them?

    The only article I found is this one

    http://digital.NI.com/public.nsf/allkb/5467F7D7895835C186256FAF00600A21?OpenDocument

    but it does not explain what the .exe is done with it, if anything.  I guess you have a total control over the .ini and there is nothing "automatic / backstage" going on here.

    Thanks in advance for your help.

    Why remind you the application builder to a custom INI file if you are going to have to read the chips inside manually anyway?  The reason to use a custom within the app Builder INI file is so that you can include specific parameters of execution (VI, access list server, port etc.) which are different from the settings using the LabVIEW development environment.

    You need not key in the INI file for your run-time application (as evidenced by the fact that if you delete the INI file, your exe will still works, creating a new INI file with default values).  If you leave the defaults, the application adds in the first leg in any case.

    You can store your own data in the same INI file used by the executable file; just put the keys in a different section.  LabVIEW Config File format INI files screws slightly differently (for example adding spaces around the = sign), but I didn't know it causes problems.

  • INI file with the characters multibyte to the language question

    Hello

    I am doing research on several language support in our CVI programs.
    I'm new to programming multibyte, as always I coded it in English so far.

    I found the Interface Localizer and have played around with translating my GUI controls. That works well, except on the title bar that is displayed in one code other than the language, I translate. But it will not work for messages popup or dynamic views.

    I read a few white papers. I'm not too worried about Run Time messages, for the most part, I'm worried about specific incentive program and the GUI.

    I've seen several topics suggesting using an external INI file to translate specific messages in my program. So I tried to create an ini file that uses Unicode and a Chinese character.
    When I call Ini_NumberOfSections using this INI file, my software returns a number of sections 0 when there is, in fact, the 1 article. This happens if I format my INI file in any format other than ANSI, Unicode.

    So my question is simple: how to read an INI file and specifically the tag, using characters to multibyte to Unicode?

    Is this a setting? Or I have to write my own read INI and the analysis of function?

    Thank you very much.

    Ok

    I finished my first step in the R & D. Here's what I know:

    I tried several formatting options, including XML, TXT, CSV and XLSX (Excel).

    With the help of the CVIXML is not an option (the less the way I tested it) since it does not accept Unicode in CVI. I did a little research and found out how to configure my XML file to Unicode, but whenever I try to read using CVIXML, the result is a failure. So I gave up this process.

    A .csv file is not a good option, because of how the file behaves in Excel. With characters Unicode, the file does not open as expected, and all my data is in the first column. If you are strictly using a text editor such as Notepad, you can read the .csv file and use it in CVI. The only issue is that you must compensate for the multiple byte characters, which I did not. So, because of the tampering of the .csv, I eliminated it as an option.

    So here's the solution I came up with that. I use the Excel Report commands (via excelreport.fp in toolslib).

    Using this method I can format my language options in Excel, view my Unicode characters and still open as planned in the CVI.  I just have to open my Excel file and load all the options of language in memory, and then close the Excel file.

    The only caviats are speed and Unicode does not appear correctly if your operating system is configured in a non-unicode format. This isn't a problem but it's a windows setting. In my typical American, unicode characters appear as? But if I change my localized language to, for example, Chinese then unicode is displayed normally.

    So, for now, this is the solution I've identified. Thanks for the tips. I hope that others will find it useful.

  • Add the user to the users group in the Users.ini file using c#

    Hello

    Using a c# application, we strive to add/remove a user from the TestStand Users.ini file.

    The CreateDeleteUsers.seq file in the samples of TestStand is used as a reference.

    We have seen that we are able to add the user to the list of user help file

    engine. UsersFile.UserList.SetPropertyObjectByOffset (0, 0 x 1, newUser.AsPropertyObject ());

    However, when we try to add the user to the user group, the sample file CreateDeleteUsers.seq said

    RunState.Engine.GetUserGroup (Locals.GroupName). Members.SetPropertyObjectByOffset (0, 0 x 1, Locals.User.AsUser.LoginName)

    If we try to replicate this in c#, the API seeks the last parameter (which is LoginName in the CreateDeleteUsers.seq file) as an object of property

    engine. GetUserGroup (this.) GroupName). Members.SetPropertyObjectByOffset (0, 0 x 1, newUser.AsPropertyObject ());

    This causes an exception of object reference when we run the application.

    Please advise on how to proceed.

    Thank you

    Arun-

    The members property is an array of string, so the 3rd parameter to SetPropertyObjectByOffset requires a string property object, IE. the user name and not of the user object. From the will of the user object error with '-17308; Specified value is not the expected type. ». The example should really be using SetValStringByOffset to be clearer so that you only specify the user name of the actual string.

  • How do I restore files using FileHistory.ini under Windows 7

    I accidentally deleted a file sometimes there is and I found that the I erased from the trash. And I found a FileHistory.ini in C:\Users\Administrator\Downloads\IniFiles and deleted file is written there. How can I restore it via this Ini file?

    I am using Windows 7 32 bit

    Hello

    Please contact the Microsoft Community and I apologize for the delay in responding to your request.

    Historical files is not available in Windows 7. It is based on window 8 and 8.1.

    You back up the files before deleting them?

    I you have to check out these items-

    http://Windows.Microsoft.com/en-CA/Windows7/recover-lost-or-deleted-files

    http://Windows.Microsoft.com/en-CA/Windows/restore-files-backup#1TC=Windows-7

    http://Windows.Microsoft.com/en-CA/Windows7/restore-system-files-and-settings

    In addition, you can use free third-party programs of recovery file as well.

    Note: third party software are to be used at your own risk.

    Let us know if it works for you.

  • After you open an ini file, I can put deny using the attribute denying access?

    I want to open an ini file and set its attribute access to any shares with another person. But when running.

    LabVIEW crash every time.  My environment is xp + labview8.5. Help me please check my Subvi.

    If labview does support not it, how can I set attribute to access ini file?

    Thank you very much.

    The output of open Config data is a refnum for the * data * in the file and not the file itself.

    You need open (open/create/replace file) instance of the file to generate a file refnum.

  • How to edit the boot.ini file in windows 7 to use 8 GB of RAM?

    I have 8 GB of RAM installed but only 3.00 GB usable.  32-bit win7.

    You're right, Windows 7 doesn't use boot.ini. You can use BCDEdit to enable EAP:

  • Why can't I just copy a profile to another system in the directory profiles and modified the ini file

    My main system crashed. I have a copy of the profile. When I move a copy of the profile in the profiles folder and edit the ini file to use the new name, I get a message that there is an instance of thunderbird running and I need to shut it down. I don't see any instance of thunderbird anywhere in the Task Manager. It happens just for me the fact that I am also in firefox may be the cause of the problem to a running instance. I'm under V31.7.0

    I tried to simply move the mail directory in the existing profile. The thing is that I don't see the old messages. I can see all of the subfolders of the Inbox on the left but not messages in the right pain. I can see new messages, but it's all in the Inbox and not filtered to the subfolder.

    I tried to activate the function of multiple profile but that doesn't seem to work.

    MY BAD
    It seems that I had something that was bad in the profile. I got the profile from a backup and now Thunderbird works fine.

    Sorry that I missed the problem earlier.

  • Satellite Pro 6100 - invalid boot.ini file message at boot

    Hello

    Don't know where to start.
    I want to just run Office 2003 from my Satellite Pro. Had problems with the HDD so I decided to format using the recovery discs.

    Now, when I start the machine initially I get the following message: * invalid boot.ini file. Starting from c:\windows.*
    After a minute or so, the following message appears. * missing or corrupted system32.hal.dll file *.

    Any ideas how to fix this please?

    Hello

    Looks like the laptop cannot start the Windows operating system and a few files damaged or are missing.
    In your case, I would try to reinstall new OS.
    Format the whole HARD drive and try again.

    If the second installation does not help, then a HARD drive should be checked may be that you need a replacement.

    Welcome them

  • Satellite 1800: boot failure - Invalid BOOT. INI file

    When I'm getting the following error message appears

    Invalid BOOT. INI file
    Booting from C:\WINDOWS\
    NTDETECT failed

    I tried using the recovery CD, but it makes no difference

    Someone at - it ideas?

    See this document from Microsoft:
    http://support.Microsoft.com/?kbid=330184

    Cehck also this:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=1328&MessageID=3021

  • Tecra M7: Unable to create recovery CD: lack CDDVD.ini - INI file load error: RDC_info.ini

    I recently bought a Tecra M7, but the system does not include recovery media, just a recovery partition and a recovery disk creator.

    However, when I try to run the Recovery Disc Creator, he responds with "error loading INI file: C:\Program Files\Sonic\RecordNow!\RDC_info.ini.

    I opened this file in an attempt to determine the error, but the content simply refer to a file named CDDVD.ini. I looked everywhere in the hard, even mounted the recovery Partition, but could not find this file.

    Search on Google, I found that this case is regularly brought disappeared, and that without it, the recovery media cannot be created. A person said Tech Support by sending an email the file, another was sent by another user.

    In both cases, the user was immediately able to make records. In any case, there seems to be a standard file, referring to the "Add_info.ini" (Application and drivers disks) and "Rec_info.ini" (OS Recovery Disk), fairly uniform and unchanging across all systems that use this method to create discs.

    Please, could someone email me them or post it here so we can all see?
    If/when I get this file, once I determined it works I post here.

    Daniel

    Hello

    You can buy a set of recovery disc for Toshiba for all £17 and£ 18. Maybe it will help if you can't find the file.

    Thank you...

  • Access to the php.ini file

    Hello

    I tried to get access to the php.ini file. But I always get the answer: 404 the/etc/php/apache2 requested URL was not found on this server.

    The path is: https://192.168.1.101/etc/php/apache2

    ReadyNAS-102, SSH is enabled, OS 6.2.5

    With witch tool and how do I open the path to the php.ini file?

    Thank you

    Thomas

    Thank you for your help.

    I made this way, but I suggest to use WinSCP instead of PuTTY. WinSCP is also free and much more comfortable than the PuTTY.

  • Noise DC value of the ini file values

    Hello

    I am trying to build a generator of signals (sine, triangle, sawtooth, square random noise, DC). I managed to get the job of waveform using the signal generator of NOR built based on VI. but I want to add the DC case that I managed to do. but I want the values (magnitude and frequency) to be in an ini file. My idea is manual sets the values in the file, once I run the vi and select the case of DC noise, it should read the file values and the data output and once I have stop, it records the values of dc before returning.

    So, I'm stuck trying to figure how to do this. I hope that I was clear enough. I don't have a code to view since I haven't started yet coding on this part. Help, please.

    Clearly enough explained.

    Take a look at the screw configuration file, found in e/s from file > Config File live. There also many examples n the community, as well as in the Finder of the example, illustrating the use of these. A good starting point is the sample Configuration settings file write example Finder, and reading Configuration settings file.

    Your .ini file will look something like this, once created:

    [DC noise settings]

    Amplitude = 1.234567

    Frequency = 8.901234

    This is equivalent to:

    [Name of section]

    Key 1 = value

    Button 2 = value

    When asked to read a specific key in a certain section, VI only through the file for the named section, and then search for they key the name you provided it. Remember, you will need to know what type of data is when you read back.

    You can use VI writing to modify specific keys in specific sections as soon as you close the file.

    This is one of a multitude of methods, you can use to do this, but are probably the simplest.

  • Best practices for the .ini file, reading

    Hello LabViewers

    I have a pretty big application that uses a lot of communication material of various devices. I created an executable file, because the software runs on multiple sites. Some settings are currently hardcoded, others I put in a file .ini, such as the focus of the camera. The thought process was that this kind of parameters may vary from one place to another and can be defined by a user in the .ini file.

    I would now like to extend the application of the possibility of using two different versions of the device hardware key (an atomic Force Microscope). I think it makes sense to do so using two versions of the .ini file. I intend to create two different .ini files and a trained user there could still adjust settings, such as the focus of the camera, if necessary. The other settings, it can not touch. I also EMI to force the user to select an .ini to start the executable file using a dialog box file, unlike now where the ini (only) file is automatically read in. If no .ini file is specified, then the application would stop. This use of the .ini file has a meaning?

    My real question now solves on how to manage playback in the sector of .ini file. My estimate is that between 20-30 settings will be stored in the .ini file, I see two possibilities, but I don't know what the best choice or if im missing a third

    (1) (current solution) I created a vi in reading where I write all the .ini values to the global variables of the project. All other read only VI the value of global variables (no other writing) ommit competitive situations

    (2) I have pass the path to the .ini file in the subVIs and read the values in the .ini file if necessary. I can open them read-only.

    What is the best practice? What is more scalable? Advantages/disadvantages?

    Thank you very much

    1. I recommend just using a configuration file.  You have just a key to say what type of device is actually used.  This will make things easier on the user, because they will not have to keep selecting the right file.

    2. I use the globals.  There is no need to constantly open, get values and close a file when it is the same everywhere.  And since it's just a moment read at first, globals are perfect for this.

  • Number of serial port configuration ini file!

    Hello guys,.

    I am creating an ini config file to save the selected serial port of VISA.

    I will adapt if the ini file doesn't exist then look to pc serial ports and choose one of them. If the file is read the value to use when I use data acquisition.

    In the example attached. I have a structure of event (such as my application), where I have a stocking to open the 'options '. If you open the main vi and pass the error, open the Subvi options and choose comport, if you click on 'ok' it save the ini file, if you click on "Cancel" it closes and show in the indicator of the value of the comport the .ini file. The Subvi works well.

    The problem is when I try to read the value of include an application start. I put the code but that's fake.

    I used "simple saving and loading control values" TST ( https://decibel.ni.com/content/docs/DOC-15349 ) and it works well for the control of the Sub - VI.

    Why I got error and I can not read ini value?... section and the key is correct. I can't find the problem.

    Concerning

    Fred.

    OpenG INI example explained on the-openg-vis-that-i-couldn't-live-without

Maybe you are looking for

  • ICloud notes do not synchronize on my MAC

    Hello. This is my first post. I'm not a sophisticated MAC user, but I tried to find a solution to my problem in the forums to help without success. My MAC running OS X Yosemite Version 10.10.5 and my iCloud notes will not download. I tried to delete

  • AIO 700 24ISH HDMI TO HDMI LG TV

    Hi all I am a new owner of an IDEACENTRE AIO 700 24ISH. What I used to do is connect laptop I had using cord to female connector hdmi etc etc movies streaming on my 50 inch TV. I did display high tour strings/clone, then only show on TV witch if off

  • Property in the subsequence charger does not change MainSequence

    We have several tests digital limits in our MainSequence and we want to change the test with the shipper of the property limits. If the property Loader consists in the MainSequence (in the Setup program) or in the hand, then the limits change. If is

  • Print with HP LaserJet 3030 from Windows XP to a Windows & Pro

    We have a HP LaserJet 3030, we put on a Pro in Windows 7 64 bit computer.  We are able to access this computer from all Windows 7 machines on our network.  We are trying to gain access to this our Windows XP Pro (32 bit), which is on our network.  Al

  • Windows xp security change (kb2483614) no runs is

    sale start automatica run pero no be runs y tanpoco manual kb2483614