Jump to content

OpenG ini file issues


Recommended Posts

Hi, 

I tried using the openg ini vis and here is my two cents feedback:

1. Read operation locks the file and doesn't open it as read-only, thus, blocking a write operation. There is no permission or access handling in the package

2. Even though a numeric variable should be represented as 4 and not as "4", for example, inside a cluster every variable is represented with " around it

3. Read/Write panel from/to ini is a great concept yet it needs to be debugged. I saw strange results from variant controls for example that got 2 lines but I wonder if it can deal with two controls with the same label, for example.

4. It would be nice if the open could have got a file reference from the general file open vi that will handle permission settings or any other file operation before the openg gets involved.

5. Some VIs require a type input yet even after they know the output type they still give out a variant. Maliablle VI?

Edited by 0_o
Link to comment

Those are all great suggestions.  The read/write panel could have other improvements too a list of controls to exclude, or an option to exclude indicators.  Do we really need to read and write the Error In/Out?  Most likely no.

The core of the code is using NI's configuration functions, which are fine for small files but for arrays of clusters of arrays it struggles.  OpenG Read/Write takes a long time for large data types that are heavily nested, or array based.  The MGI Read/Write Anything work much better when it comes to this.

Link to comment
1 hour ago, Michael Aivaliotis said:

Do people still use ini files? I mean XML, Json? What is the consensus. Should any effort be put into this? Yes, the MGI tool is way faster. Yes, I'm derailing this post...

Whenever I have something that an average human is going to edit I use INI files. It's a lot harder to completely mess up and easier to understand for non-software types. Otherwise, I've shifted to JSON.

Link to comment

Since you asked... I personally don't use ini files.

I use MVC and thus all my controls are also in a class. 

I use traverse and save the class as a binary file. 

For config I use JSON or SQL.

However, some projects demand ini file config so here we are

Link to comment

I actually still use the OpenG ini library for a lot of my config files. As I recall, it's output was a bit more human-readable compared to the MGI ini format. Recently I've started to look at TOML as a possible replacement: https://github.com/erdosmiller/lv-toml

Of course JSON or XML could also work very well but they look a bit more intimidating to the non-technical user.

  • Like 1
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.