Owning Class: support
Installed With: Full Development System
path(a)
path(a, b)
path(a, path)
path(path, b)
c = path
Returns the current search path list. LabVIEW searches the path list from top to bottom. If you define a function to use in the LabVIEW MathScript Window or in the MathScript Node, you must add the directory in which that function resides to the search path list.
path(a) changes the current path to a. path(a, b) changes the current path to the concatenation of the two input paths. path(a, path) adds a to the beginning of the search path list. path(path, b) adds b to the end of the search path list.
| Name | Description |
| a | Specifies a path. a is a string. |
| path | Specifies the existing path list. |
| b | Specifies a path. b is a string. |
| Name | Description |
| c | Returns the list of all current paths. c is a string. |
Changes you make to the search path list using this function apply only to the current instance of the LabVIEW MathScript Window or the MathScript Node from which you call the function. Changes to the search path list for one MathScript Node do not apply to any other MathScript Nodes. LabVIEW resets the search path list to the default when you close the LabVIEW MathScript Window or when the MathScript Node stops executing. Use the MathScript: Search Paths Options page to change the default search path list.
If you call this function from a MathScript Node or a user-defined function, a warning glyph appears in the MathScript Node next to the line from which you call the function. The warning glyph indicates that LabVIEW operates with reduced error checking and slower run-time performance for the MathScript Node. To improve the error checking and optimize the performance of the MathScript Node, remove this function from scripts and user-defined functions. Also, do not change the MathScript search path list at run time. Instead, use the MathScript: Search Paths Options page to configure the default search path list.
This function is not supported in the LabVIEW Run-Time Engine. Do not use this function in a stand-alone application or shared library.
path(path,'C:\Program Files\National Instruments')
%Make sure the folder test's subfolder exists in the test folder on the C drive
path('C:\test\test''s subfolder', path)