LabVIEW项目或库文件已损坏

简介: LabVIEW项目或库文件已损坏

LabVIEW项目或库文件已损坏

尝试打开项目文件(*.lvproj)时,不断收到错误:项目或库文件已损坏。

当尝试在新计算机上打开类库时,看到错误内存或数据结构损坏。无法加载文件,但库在另一台计算机上打开正常。


如何解决此问题?


遵循这些步骤可能有助于修复库或项目文件损坏。如果没有备份,许多损坏将无法恢复。


1. 右键单击损坏的文件,然后单击打开方式...,选择记事本


2. 将代码复制并粘贴到MicrosoftWord中


3. 如果有有效的备份版本,请将代码作为新的MicrosoftWord文档复制并粘贴到Word中。


4. 现在使用“跟踪更改/比较”功能比较Word中的两个版本。*跟踪更改/比较功能可在MicrosoftWord 的“审阅”选项卡中找到。


修复LabVIEW项目文件损坏


这个问题可以通过编辑项目文件的XML代码来删除对这个损坏的库文件的引用,或者通过修复库文件损坏来解决。


使用LabVIEW64位打开LabVIEW项目文件


如果代码是在32位位版本的LabVIEW中编写,则在64位LabVIEW中打开代码将增加应用程序内存,并可能解决基于大型框图的损坏。


修复LabVIEW项目文件或库文件损坏如果某些结束XML标记在保存过程中未完全写入过程,则项目文件和库文件都可能被损坏。


例如,损坏的项目文件可能在文件末尾缺少以下行:


</Item>


</Item>


</Item>


</Project>


这些行将关闭项目和项引用。项引用是特定于项目的,因此,如果项目包含更多或更少的这些行,请不要担心。如果这些引用未关闭,LabVIEW将无法关闭项目文件,并随后通知用户项目已损坏。


如果没有项目的备份副本,请创建一个新项目并访问源代码,如上所述。查找空项目和损坏项目之间的任何明显差异。


通常,这些差异将涉及缺少XML标记,用户应密切关注项目/库的工作备份副本和损坏的项目/库文件中的这些引用。


如果上述任何步骤解决了问题,请尝试在PC上删除并重新安装所需的NI软件。


附加信息


由于多种原因,项目文件可能已损坏。例如,在自动保存过程中,可能发生了LabVIEW内部错误,注册键可能已损坏,或者电源可能已关闭并损坏了文件。


通常,这些损坏会导致项目或库文件中缺少条目。库和项目文件以XML格式编写,可以使用任何基于文本的编辑器打开。但是,处理这些文件的最简单方法是最初使用Microsoft记事本或Microsoft写字板打开它们,然后将内容复制并粘贴到MicrosoftWord文档中。


项目的工作备份副本可用于诊断和修复损坏。备份副本不必与损坏的副本完全相同。但是,备份副本可以为工作项目或库文件中的预期内容提供框架或模板。




Solution

Following these steps may aid in fixing alibrary or project file corruption. Many corruptions will beunrecoverable without a backup.


Right-click the corrupted file, and click on Open With..., select Notepad


Copy and paste the code into Microsoft Word


If you have the working back-up version, copy and paste the code into Word as a new Microsoft Word document.


Now compare the two versions in Word using Track Changes/Compare functionality. *The track changes/compare functionality is found in the Review tab of Microsoft Word 2007.


Fixinga LabVIEW Project File Corruption


A corrupted library file can also corrupt a project file if the corruptedlibrary file was included in the LabVIEW project. This issue can beresolved by either removing the reference to this corrupted library file byediting the XML code for the project file, or by fixing the library filecorruption.


Open the LabVIEW Project File With LabVIEW64-bit


If the code was written in a 32-bit version of LabVIEW, opening it in 64-bitLabVIEW will increas the application memory and potentially resolve corruptionbased off of large block diagrams.


Fixing a LabVIEW Project File or Library FileCorruption


Project files and library files can both be corrupted if some of the closingXML tags were not written completely during a save process.


For example, a corrupted projectfile may be missing the following lines at the end of the file:


</Item>


</Item>


</Item>


</Project>


These lines are closing the project and itemreferences. The item references are project-specific, so do not concernyourself if your project has more or fewer of these lines. Ifthese references are not closed off, LabVIEW will not be able to close theproject file, and subsequently inform the user that the project has been corrupted.


If you do not have a backup copy of theproject, create a new project and access the source code as describedabove. Look for any obvious differences between the empty project and thecorrupted project.


Often times these differences will involvemissing XML tags, and the user should pay close attention to these referencesacross the working back-up copy of the project/library and the corruptedproject/library file.


If any of the previous steps solve the issue,try removingand reinstalling the required NI software on the PC.


AdditionalInformation

A project file can be corrupteddue to many reasons. For example, during the automated save process,a LabVIEW internal error may have occurred, registry keys may be corrupt, orpower may have shut off and corrupted the file.


Often times, these corruptions result in amissing entry within the project or library file. Library and project filesare written in XML format and can be opened up with any text-basededitor. However, the easiest method of working with these files willbe to open them with Microsoft Notepad or Microsoft Wordpad initially andthen copying and pasting the contents to a Microsoft Word document.


A working back-up copy of the project can beuseful in diagnosing and fixing the corruption. The backupcopy does not have to be exactly the same as the corruptedcopy. However, the back-up copy can provide a framework or a template forwhat to expect in a working project or library file.



需要说明的是,上述的例程和文档,都是可以下载的,双击即可打开,其中压缩文件是可以采用粘贴复制的方式,拷贝到硬盘上。这不是图片,各位小伙伴看到后尝试一下,这个问题就不用加微信咨询了。有关LabVIEW编程、LabVIEW开发等相关项目,可联系们。附件中的资料这里无法上传,可去公司网站搜索下载。

相关文章
|
6月前
LabVIEW应用程序exe和安装程序的区别
LabVIEW应用程序exe和安装程序的区别
34 3
|
6月前
|
数据采集
LabVIEW写入可快速加载的TDMS文件
LabVIEW写入可快速加载的TDMS文件
186 1
|
6月前
|
存储 Apache 开发工具
LabVIEW与TortoiseSVN进行源代码控制
LabVIEW与TortoiseSVN进行源代码控制
85 0
|
6月前
LabVIEW为可执行文件构建安装程序时找不到运行引擎
LabVIEW为可执行文件构建安装程序时找不到运行引擎
69 0
|
6月前
|
网络安全
LabVIEW崩溃问题解决方法
LabVIEW崩溃问题解决方法
307 0
经验分享:u盘文件或者目录损坏无法读取、无法正常打开,如何解决?
u盘突然无法正常打开,显示目录损坏。。。 找寻了网上众多方法。以下是解决方案 win+R 打开后输入cmd之后输入:chkdsk +你要修复的u盘+/F
经验分享:u盘文件或者目录损坏无法读取、无法正常打开,如何解决?
1分钟解决VS每次运行都显示“正在还原nuget程序包”问题
1分钟解决VS每次运行都显示“正在还原nuget程序包”问题
|
关系型数据库 MySQL C++
解决“无法启动此程序,因为计算机中丢失VCRUNTIME140.dll,尝试重新安装此程序以解决此问题”方案合集
解决“无法启动此程序,因为计算机中丢失VCRUNTIME140.dll,尝试重新安装此程序以解决此问题”方案合集
解决“无法启动此程序,因为计算机中丢失VCRUNTIME140.dll,尝试重新安装此程序以解决此问题”方案合集
CLion中创建多个.c文件不能运行问题及报错问题
CLion中创建多个.c文件不能运行问题及报错问题
CLion中创建多个.c文件不能运行问题及报错问题
|
数据安全/隐私保护 Python Windows
安装无法继续,因为一个必需文件已损坏或不可用,请从原始源光盘活下载位置重新运行安装程序
了解安装无法继续,因为一个必需文件已损坏或不可用,请从原始源光盘活下载位置重新运行安装程序
909 0