Why "write configuration file (T)" on Close Config Data vi?
If I open a config file refnum, write to one of its sections, then close the config refnum and have "write to configuration file (T)" set to FALSE, does the config file revert back to what it was when the refnum was first opened? In other words, the write to section vi essentially has no effect?
If this is not the case, what is the purpose/function of the "write to configuration file (T)" on the close config data vi?
Thanks,
Greg
Message Edited by gstanczak on 04-04-2010 04:24 PM
v7.1
The write VIs for the configuration set of VIs don't actually write anything to file - they write to a software buffer. If you open the write VIs you will see that essentially a "functional global", aka LV2-style global, aka Action Engine, is being used (albeit in a bit of a mess in my opinion). Thus, you need to set the input to True when closing it. That's what actually writes to disk. You would want to set that to False if you're just opening the file for reading.
Similar Messages
-
Cannot write configuration file
Hello,
I have a problem loading up a project I have taken over from some one else. I need some guidance as I can't seem to find the solution. However im not that familiar with .NET or MVS as I once
was. The message I get is as follows :-
Microsoft Visual Studio
Creation of the virtual directory localhost:49623/ failed with the error: Filename: \\?\C:\Users\firstname.surname\Documents\IISExpress\config\applicationHost.config
Error: Cannot write configuration file
However I have checked the permissions and can't see anything obvious. Under guidance from another developer I have also updated :-
www.nuget.org/
and
www.nuget.org/packages/Microsoft.AspNet.Mvc
I am using a Windows 7 enterprise edition Dell Lattitude laptop. With MVS as follows
Microsoft Visual Studio Professional 2012
Version 11.0.50727.1 RTMREL
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Microsoft Visual Studio Tools for Applications 2012 04938-088-1153812-02395
Microsoft Visual Studio Tools for Applications 2012
Office Developer Tools 04938-088-1153812-02395
Microsoft Office Developer Tools
Team Explorer for Visual Studio 2012 04938-088-1153812-02395
Microsoft Team Explorer for Visual Studio 2012
Visual Basic 2012 04938-088-1153812-02395
Microsoft Visual Basic 2012
Visual C# 2012 04938-088-1153812-02395
Microsoft Visual C# 2012
Visual C++ 2012 04938-088-1153812-02395
Microsoft Visual C++ 2012
Visual F# 2012 04938-088-1153812-02395
Microsoft Visual F# 2012
Visual Studio 2012 Code Analysis Spell Checker 04938-088-1153812-02395
Microsoft® Visual Studio® 2012 Code Analysis Spell Checker
Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V.
All rights reserved.
Visual Studio 2012 SharePoint Developer Tools 04938-088-1153812-02395
Microsoft Visual Studio 2012 SharePoint Developer Tools
NuGet Package Manager 2.8.60318.667
NuGet Package Manager in Visual Studio. For more information about NuGet, visit docs.nuget.org/.
PreEmptive Analytics Visualizer 1.0
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Analysis Services
Microsoft SQL Server Analysis Services Designer
Version 11.0.5058.0
SQL Server Data Tools 11.1.20627.00
Microsoft SQL Server Data Tools
SQL Server Integration Services
Microsoft SQL Server Integration Services Designer
Version 11.0.3436.0
SQL Server Reporting Services
Microsoft SQL Server Reporting Services Designers
Version 11.0.3436.0
Web Developer Tools 1.0.30710.0
Microsoft Web Developer Tools contains the following components:
Page Inspector: Tool that offers an efficient way to decompose Web Applications and diagnose front-end issues.
Web Publishing: Extensions required for Web Publishing for both hosted servers as well as on premises.
Web Form Templates: Includes the default templates for Web Form Applications.
Editor Extensions: Includes HTML, CSS, and JS editor extensions that greatly enhance the development experience.I see some others have had success by removing encryption on the IISExpress folder and removing the Read Only attribute as well.
See this post for details.
Others have had success by doing the following:
- Run Command Prompt (cmd) in Admin Mode
- Enter the following command: DISM /Online /Cleanup-image /Restorehealth
...as detailed here. -
Close config data.vi changes comment lines
When using the "close config data.vi" with write config file set to true, I get ="" appended to comment lines, like
; this is a comment line
changes to
; this is a comment line=""
Does LV6.1 not support comment lines or does it use a different character?This is a problem of the close config vi.
The vi gets all keys (keys are the values before =) and the values (behind
=). When the data is stored, the vi puts 'key'='value' in a string for each
line.
When a empty line is encountered, this happens. The key is ''. The value is
''. The output result is ="", because empty values, and values with spaces
in them are contained between quotes.
When '; comment' is encountered, the key is ';comment', the value is '', the
result is ;comment="".
You'll have to modify a very low level sub vi inside close config.vi to
resolve this. The problem has been there since lv supports .ini files.
Regards,
Wiebe.
"BillT" wrote in message
news:[email protected]..
> Whe
n using the "close config data.vi" with write config file set to
> true, I get ="" appended to comment lines, like
>
> ; this is a comment line
>
> changes to
>
> ; this is a comment line=""
> Does LV6.1 not support comment lines or does it use a different
> character? -
How to use an install.xpi configuration file to set up email data
Manual setup of my email account failed because Thunderbird searches for my domain name and it is not in its database. So my host provider gave me an auto-config file for Thunderbird for my email account, called install.xpi - But how do I use this file? I can't double-click on it in Windows to do anything. In Thunderbird program it wants to create a new account but I can't do anything else in it like file import.
How to use install.xpi file so it creates my email account with the proper setup variables? Thanks for your help.Start Thunderbird, close the wizard, goto the Tools menu (alt+T) select add-ons
There's a tiny button to the left of the search window. Click this and select Install Add-on From File and Navigate to your xpi file, select it, and off you go. -
Modification to Write Configuration .ini file
I have found one of the annoying things about Labview's configuration file VI's is that when the configuration file is written, all spacing between sections is eliminated making it hard to read, even if the spacing was there to begin with when the file was read. For example, I would like the file to look like
[Header1]
key1=value1
key2=value2
[Header2]
key3=value3
key4=value4
But it comes out looking like:
[Header1]
key1=value1
key2=value2
[Header2]
key3=value3
key4=value4
making it harder to read.
I made a modification to the file Config Data to String.vi which is located \vi.lib\UTILITY\config.llb\
Make a backup copy of \vi.lib\UTILITY\config.llb\Config Data to String.vi and replace the file in the config.llb with the attachment (saved as LV 8.0).
What I did was any time a section header is to be written to the file, I preceded it with another CRLF character so that it creates a blank line just before the section header. To keep from having an extra blank line at the beginning of the .ini file, it does not create the CRLF there.
I hope others will find this modification useful.
Attachments:
Config Data to String.vi 26 KBtst wrote:
The idea itself is great, but I don't like the idea of changing vi.lib files (for several reasons).
I didn't look at your code, but I assume that at least in this case, the resulting files will still be processed fine by machines which don't have this modification, so it's probably not as bad, but I still don't like it.
You should probably go to the Product Suggestion Center and tell NI about this idea.
I agree about not trying to change the vi.lib files. It gets into modifying code that is rather deeply embedded about 3 or 4 sub-vi's down. By my testing, machines without the modification do handle the files just fine. The alternative would be to create a backup copy of the whole library and rename the files and use my own versions instead. I've recently installed the OpenG files and looked into them. I like the functionality they provide to be able to store and retrieve clusters of configuration data. Of course they have NI's write configuration files at the heart as well, so if they link to the original VI library then they will generate the same .ini files missing the extra lines that I like.
tst wrote:
You should probably go to the Product Suggestion Center and tell NI about this idea.
Thanks, I already did this some time ago when I created a test VI to just read and close an .ini file. I found that without setting the "write configuration file" flag in the close config file VI (which defaults to True), the whole file got rewritten even though nothing had changed. That's how I stumbled across this loss of blank lines thing.
I hope NI will look into that suggestion and add it to the config file VI library in the future. It would probably need to be implemented with a flag that says "Add blank lines?" that would default to False so that the original behavior of the VI could be maintained. Since the VI that controls the appearance of the file is a few layers deeper than Close config file VI, that flag would have to be passed through a couple of sub-VI's.
Thanks for your feedback.
Message Edited by Ravens Fan on 09-22-2007 03:22 PM -
Content of Ini-File with config-data sometimes deleted?
Hello,
i have a simple vi attached where i read config-data from a file.
Sometimes it happens that the content is lost. I am not sure why, but perhaps there a errors in the vi.
I wonder about the last vi "Close Config Data" there is an onput-parameter "write configuration file? (T)".
Why is this parameter set to default-TRUE? Could it be that i shouzld set it to False? Perhaps this
close-vi overwrite my data with nothing.
The vi reads the section [Par1] from this file:
[Par1]
PathFile=C:\\profile.txt
[Par2]
PathFile=C:\\variants.txt
and returns --> C:\\profile.txt
Thx for your help
Attachments:
example.vi 21 KBThe values set by using the INI file functions only exist in memory and are NOT written to disk until the "Close" VI with the constant set TRUE.
If your code executes in multiple threads where one thread sets the values but another thread closes the file without the constant set true, the values will be removed from memory and will not be written to disk.
So make sure you only execute the "Close" after all values have been set and make sure the constant is set true when the files are closed.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
hello,
my vi doesnt work. the vi should write data to an ini file.
has anyone an idea?
Attachments:
WriteIni.vi 47 KBSet the 'Write to configuration file' to True in your Close Config Data.vi
-
Configuration file for servlets
Hi, everyone
I have one problem,I can't solve:
I want write configuration file for several servlets (by incapsulating my static class Config in DBServlet subclass), but I don't know how can I find this config file in runtime( it will be placed, as I think in root documents directory of web-server).
I can't use no method of DBServlet and HTTPRequest on its initialization phase (suche methods as getServletContext, getServerName, getServerPort and others), so
I can't get real path of root documents directory of web-server.
If I will read this file by URL like "localhost/config.cfg" there will be problem in web-server configuration with access permissions, I think.
Is there some standard ways to find and read in servlet runtime from file , which is placed in root documents directory of web-server.
Thanks in advance, EdEd,
Your configuration file must be in your CLASSPATH.
Regards
Blaise -
Upload AE configuration file?
Once again, my AE started acting up. A hard reset didn't work, so I did a factory default reset. "How clever," I thought, "the last time this happened, I saved my base configuration file!"
The base station finally appeared in the list in Airport Utility. Then I went to File>Open Configuration File..., opened the base configuration file I had saved last time, and then... what?
Is there some way to upload the configuration once it's saved? I didn't see anything in the menus or the buttons or tabs of either the main Airport Utility window or the baseconfig window that looked anything like "Write Configuration File to Base Station" or "Upload Configuration File." I ended up just using the information in the old config file as a reference while I went through and did the setup manually. I might as well have had it all scribbled on a Post-It! What did I miss?
Thanks!Never mind - I just figured it out. If you select the base station in the left side of the main Airport Utility window and press <return> a new window opens. This enables the File>Import... menu item, and then you can select the configuration file and upload it.
Sure would be nice if there were something the manuals or the help files about this, though... -
Wait until text-file is REALLY close
How can I protect file-write if power is shutdown imediately?
I write tmp file and I need read data from this file after power shutdown(or hard reset), but file is sometimes corrupted.
FileWriter ff = new FileWriter(lastFILE,false); //new file
f.write("<kredit><" + kredit + ">");
f.write("<pot><" + pot + ">");
f.write("<bonus><" + bonus + ">");
f.close();Error is sometimes occuring when I make test:
1)I write data to file
2) wait aprox. 1 sec (in Java there is 1 second after close function)
3) turn off PC, switch-off (or hard reset)
4) turn on PC and file is corrupted
I use Windows XP(ntfs) on Compat Flash Card. I turned off write caching in Windows for HDD but problem is still during.
I think error is in Operation System because there is write caching on HDD and that's why I am looking for some function which will be wait if file is really close.
Any Ideas?
Thanks.crosspost
http://forum.java.sun.com/thread.jspa?messageID=9828180 -
I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
168 and Struts Support" patch.
I select the struts module successfully "struts-example" and am prompted for the
location of name mangled configuration file (i.e "struts-config.xml" for struts-example
becomes "jpf-struts-config-struts-example.xml").
As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
"Cannot parse the struts configuration file."
Given that this is a file supplied with the struts distro and that I can deploy
the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
with my attempt to use the Struts Portlet.
Can anyone please help?
Thanks,
--Andy HullI'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
168 and Struts Support" patch.
I select the struts module successfully "struts-example" and am prompted for the
location of name mangled configuration file (i.e "struts-config.xml" for struts-example
becomes "jpf-struts-config-struts-example.xml").
As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
"Cannot parse the struts configuration file."
Given that this is a file supplied with the struts distro and that I can deploy
the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
with my attempt to use the Struts Portlet.
Can anyone please help?
Thanks,
--Andy Hull -
"Could not write to configuration file" when config Publisher in admin tab
Hi guys,
I have install OBIEE 10.3.3.4 on an RH linux box (with OS user obiee) and Oracle Application Server 10.1.3.1 on the same box (with OS user oraias).
When I want to change some parameter in the admin tab of BI publisher (Administrator/Administrator as the login name/pass) and click "Apply",
I get the error "Could not write to configuration file". After I change the configuration properties to 777 the error is sitll there. And I also try to change the SECURITY MODEL to XDO, but still no use.
I made a test, for example, when I change something in admin--JDBC--Oracle BIEE and then apply, I got the error. If I update xmlp/DataSource/datasources.xml manually, the change can be seen after I reopen the page admin--JDBC--Oracle BIEE. That means I find the correct file and the file access properties is ok.
For other parameters such as Scheduler Configuration, I got the same error when apply. But the "Test connection" and "Install schema" work.
Can somebody give me some advise on this ? Thanks
Scott
Edited by: Typhoon on Mar 20, 2009 12:59 AMI have install the same version(basic install) on another windows box, everything seems good...
And below is the error log I find in application.log
09/03/19 13:31:53.956 xmlpserver: Servlet error
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at oracle.apps.xdo.servlet.ui.admin.SchedulerConfigPage.handleSubmit(SchedulerConfigPage.java:248)
at oracle.apps.xdo.servlet.ui.admin.SchedulerConfigPage.doPost(SchedulerConfigPage.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)
at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:86)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:302)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.AJPRequestHandler.run(AJPRequestHandler.java:190)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Thread.java:595) -
Can I change the content of a section in config data file use Configuration File VIs of LV?
There are few sections in my .ini file, I need to change the content of a section in this .ini file. Are Configuration File VIs in File I/O fuction pallete able to do that?
Thanks.You should be able to. Open the .ini file, read the key (if it exitst) delete it and write a new key (you might be able to directly overwrite the key but I havent tried this). Close the file with the write file? set to true and you should have modified the .ini file with the config vis.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
Read and write Values from Configuration File in BizTalk
There is a requirement where Biz talk orchestration read the value dynamically from Config Store.After some process updating the value in config store.
I though to use SQL Server and create one table with single column.Biztalk will call the Storeproc to get the value and similary for update system will call another SP.
Instead of using SQL Server DB is there option to implement this requirement like app.config,BTSsvcxxexe.config ,SSO Config store etc.
If multi-users access the value from Config store and try to update ,how to handle lock mechanism.Hi BizQ,
Refrain from using BTSConfig file or any custom config file if you have a requirement to update the data. Modifying a
configuration file at runtime can cause some nasty, unexpected behavior inside your application if it's not managed properly.
I would suggest you to use Custom DB or SSO Database in this case.
Both have their Pros and Cons.
SSO Database:
You get out of the box encryption
It is a central store which will service all BizTalk servers within your group
SSO implements a caching mechanism internally for the data
Custom DB:
By storing the configuration in the database you don’t have to worry about consistency of data across servers like you would with a config file.
Cache needs to be implemented by program to avoid delays in reading from physical file.
In your case I recommend to go with SSO DB as in terms of storing custom configuration data in SSO for End Point/Application
specific information and credentials and potentially configuration information which you also need to write and update at runtime from your code or via an administrator.
You can use Richard Seroter's tool to store values as "Config Store" in SSO database and then write a .net helper
utility to retrieve it using SSOConfigStore class. It has method GetConfigInfo and you need to pass application name with other parameters. It returns ConfigurationPropertyBag from where you can read property name and values.
http://seroter.wordpress.com/2007/09/21/biztalk-sso-configuration-data-storage-tool/
http://blogs.msdn.com/b/teekamg/archive/2009/08/19/sso-configuration-application-mmc-snap-in.aspx.
Rachit
Please mark as answer or vote as helpful if my reply does -
How to close a write to file express VI
Hi,
I am using an Write to File express VI inside a subVI in LabVIEW 7.1. Since it is in a DAQ loop it is configured to create only one file even though it is called many times.
The problem I am having is that when the subVI itself is closed and reopened the express VI does not prompt to create a new file. Is there a way to get around this?
I am hoping there is some sort of invoke or property node that I can use on either the express VI or the subVI itself to close or "reset" it.
Does a subVI stay in memory even after the front panel is closed? I am guessing this is what is causing my problem. Any ideas?
I do realize the BEST thing to do here would be to simply not use an express VI but I am hoping there is a way to fix this without going that far yet. From what I can tell LV7.1 does not allow me to convert an express VI to code which makes it look like it will take even longer to rewrite this.
For now the solution we have in place is the following: close the subVI, close the main program (the calling VI), and then reload.
Thanks,
Davedave,
if i remeber correcty... there is a file path option will be available with the express vi... I actualy can not reproduce this here since i dont have LV 7.1. So if you feel that the express vi does not gives you a prompt for selecting the file path, then just place a "File dialog" function before the express vi and wire the selected path.
Regards
Guru (CLA)
Maybe you are looking for
-
2 Iphones (3GS') and only one ITunes Account
Greetings all, While new to the forum my wife and I are not new to the Mac family. Recently we decided to bite the bullet and drop VZW in exchange for the Iphone 3GS. My question is, we currently have one email address and we each use that one to log
-
Hi, I was looking through Virum's example of actions and it made me wonder what's the best way to use ActionListener because I saw he used it a different way than I was using. I'm talking about using inner classes (interfaces i believe?) vs the metho
-
BAPI/Function module for FAIV06
Hi All, I want post the debit/credit material document using transaction FAIV06.I searched for BAPI/function module but nothing found. if you know any bapi/function module or is there any alternate method for posting the document. please help. Thanks
-
I've run into the problem. Adobe Reader X fails to start when installed on Windows Server 2012 with Remote Desktop Services installed. Adobe throws a message that internal error occurred and then closes promt screen. Adobe Reader X installed on 2012
-
Missing font/substituted font in nav bar
I cannot seem to get rid of a rogue font on my site. It appears to be in the Navigation Bar that is part of the Modern webpage template (see script code below). This text box is not editable in iWeb as far as I can tell. Each time I go to a page in I