NI LabVIEW,CVI,数据采集等产品讨论区

取消
显示结果 
搜索替代 
您的意思是: 

ini配置文件的问题

已解决!
转到解答

我本来打算使用点击菜单的方式读写ini文件的可是不行,而且第二次再点击该菜单时还会弹出如下错误提示,但是我在外面读写ini而不是在菜单事件里读写是完全可以而没有错误,这是怎么解释?望大家帮我答疑。

configini.JPG

0 项奖励
1 条消息(共 8 条)
6,065 次查看

Proper "closing" of the config file is necessary, and you should do it once only upon exiting the entire code.

 

What I mean is that the Config File could be already closed (by the outside Case), when you are trying to access it through the even case(s). 

Message Edited by ian fung on 11-02-2009 01:16 PM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
2 条消息(共 8 条)
6,054 次查看

但是他为什么不能读写到ini文件呢?读到的是空值,写也是空。而不加事件的是可以

0 项奖励
3 条消息(共 8 条)
6,048 次查看
As already mentioned... the Config File is, probably, already been closed (at the outside Case).
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
4 条消息(共 8 条)
6,042 次查看
err.JPG那我现在更改成这样但还是不能读到数据,跟保存
0 项奖励
5 条消息(共 8 条)
6,038 次查看
解答
已被主题作者 西门吹水 接受

When writing a config file, the input "write configuration file? (T)" to the Close Config Data.vi must set to True.

And, set to False for reading. 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
6 条消息(共 8 条)
6,033 次查看
的确设为TRUE就能把数据保存。已经解决这个问题了,原来是有读到数据的,只是在控件初始化时这个给清空了,所以没看到,我设断点就明白什么问题了。thx ian fung
帖子被西门吹水在 11-02-2009 01:36 AM
时编辑过了
0 项奖励
7 条消息(共 8 条)
6,013 次查看
Do my answer worths a Kudos?
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 项奖励
8 条消息(共 8 条)
6,009 次查看