Description Searches a specified file directory for all *.fgd and *.dat files and attempts to create Analysis Results Nodes (ARNs) from them. An error string is returned that reports any issues when attempting to create ARNs from the identified files.
Syntax errStr = ARNCreateFromDirectory( directoryPath, arns() )
Parameters errStr (String) Return string containing any error conditions encountered during the creation of ARNs from the identified files.
directoryPath As String Full directory path string to the directory being searched for *.fgd and *.dat files to be imported as ARNs. The directory path string is not required to end with a trailing "\" character and will work whether the trailing "\" is present or not. The wildcard character, *, may be used in the directory path string specification for pattern matching. Unless the wildcard character is used, the default behavior is to identify all *.fgd and *.dat files in the directory. Some examples of wildcard usage are:
arns() As Long After the function executes, this array contains the node numbers of the ARNs that were created.
Example The script below creates ARNs from all .fgd files in the C:\temp directory, prints the returned error string to the output window and then loops over the ARNs and prints their index and names to the output window.
Sub Main
ARNDeleteAllNodes()
Dim arns() As Long, errStr As String errStr = ARNCreateFromDirectory( "C:\temp\*.fgd", arns() )
Print "Error msg: " & errStr
Dim curarn As Long For curarn = 0 To UBound(arns) Print curarn; Print ARNGetName( curarn ) Next
End Sub
See Also
|