Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Database Add Alias.vi doesn't accept relative paths?

Highlighted

I'm trying to add/delete/modify database aliases and I'm having a problem with using relative path constants. XNET throws a "-1074384767" error when you use anything other than an absolute path or prefix it with a file constant. Should this only work with an absolute path? Attempting to explicitly add ".\" in the file path doesn't do anything because it (correctly) deletes it since it's redundant.

 

XNET alias test.png

The existing code uses relative paths so it presumably worked in some previous version of XNET and/or LabVIEW.

 

Current setup:

  • LabVIEW 2017 SP1 17.0.1
  • NI XNET 17.5.1
  • Windows 10 Enterprise, release 1803, build 17134.1550
0 Kudos
Message 1 of 3
(158 Views)
Highlighted

I've never used a relative path, but that would make me ask the question, relative to what?  LabVIEW.exe?  A build application?  The running VI? A database cache location?  I'm not surprised it doesn't work, and if it ever did work it may have been an unintended feature that was patched out.  I'd recommend turning your relative path into an absolute one.

0 Kudos
Message 2 of 3
(152 Views)
Highlighted

A fair question, to be sure, one that I will pass back to the original author. I was operating under the assumption that the existing code was indeed functional since it's not my source code and it "works" on existing machines.

 

A quick look at the XNET API for C didn't help either because it makes no distinction of absolute vs relative path, nor explicitly states that absolute is required.

0 Kudos
Message 3 of 3
(146 Views)