ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI_LVconfig.lvlib:open config data.vi requires absolute path to the ini file?

Solved!
Go to solution

The specifics

Windows 11 Enterprise

LabVIEW 2022

TestStand 2021

 

I am creating test installs using Source Distribution, TestStand Run-Time engine and operator interfaces that call the test stand sequences.  I have set up the VIs to use relative addressing and "always included" the support files needed by the VIs.  I have run into a problem  the NI_LVconfig.lvlib:open config data.vi is given the relative path (in the same execution directory as the VI that calls this VI) but I get this error:

Error, Test Sequence Error: Restart the application!!! 
Open/Create/Replace File in NI_LVConfig.lvlib:Load.vi->NI_LVConfig.lvlib:Open Config Data.vi->ReadOracleServerString.vi
OracleConnectionInfo.txt
LabVIEW: The path is empty or relative. You must use an absolute path. [Error Code: 1430, Code Module/User-defined error code.]

I have tried to get around this, but can't.  Is it true that this "open" code will only work with a direct full address to the setup file?  This kind of complicates creating a self-contained test install.  Am I missing something?

 

be well,

DLC

0 Kudos
Message 1 of 3
(300 Views)
Solution
Accepted by DLMC

@DLMC wrote:

 

Error, Test Sequence Error: Restart the application!!! 
Open/Create/Replace File in NI_LVConfig.lvlib:Load.vi->NI_LVConfig.lvlib:Open Config Data.vi->ReadOracleServerString.vi
OracleConnectionInfo.txt
LabVIEW: The path is empty or relative. You must use an absolute path. [Error Code: 1430, Code Module/User-defined error code.]

I have tried to get around this, but can't.  Is it true that this "open" code will only work with a direct full address to the setup file?  This kind of complicates creating a self-contained test install.  Am I missing something?

 

be well,

DLC


According to the error message the error comes from "Open/Create/Replace File".

And the help for "Open/Create/Replace File" (https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/open-create-replace-file.html), says this file path has to be absolute:

file path is the absolute path to the file.
If you do not wire file path, the function displays a dialog box from which you can select a file. If you specify an empty or relative path, this function returns an error. If file path is the path to a directory that does not exist, this function returns an error. Use the Create Folder function to create a directory.

 

Try to build the absolute path to your file with "Current VI's Path", "Application Directory", "Default Data Directory" or "Get System Directory".

Message 2 of 3
(241 Views)

@UliB wrote:

Try to build the absolute path to your file with "Current VI's Path", "Application Directory", "Default Data Directory" or "Get System Directory".


That was the key - I knew this, I just forgot it.  Or some excuse like that.

Thanks for the fast reply.

 

be well, 

DLC

0 Kudos
Message 3 of 3
(215 Views)