|Download Help (Windows Only)|
AnalysisUtilities.ValidatePath ( Path, baseLocation, apiLocation, validationOptions)
Use this method in an analysis module to validate a path. An analysis module can call this method to perform path validation on any property that is not an instance of the Path data type or to validate a path with a different validation option than the built-in analysis modules.
If the analysis module calls this method on path properties within a step, the analysis module must set the AnalysisUtilities.AutomaticPropertyCheckingEnabled property to False to ensure that the sequence analyzer does not report duplicate messages, and the analysis module must perform all path and expression property checking for the step
If the rules are enabled, this method reports analysis messages for the NI_ValidPath rule, the NI_FileNotFoundWarning rule, and the NI_FileNotFound rule.
If you set the AnalysisUtilities.AutomaticPropertyCheckingEnabled property to True, the built-in analysis modules call this method with the validationOptions parameter set to ValidatePathOption_DoNotCheckIfExists for all properties that use the Path type.
For path expression properties, analysis modules must instead call the AnalysisUtilities.ValidateExpression method and pass ValidateExpressionOption_Path for the evaluationFlags parameter.
Path As String
[In] Pass the path to validate. This path can be a relative or absolute path.
baseLocation As PropertyObject
[In] Pass the base object to use with the apiLocation parameter as the location associated with any analysis messages this method reports.
apiLocation As APILocations
[In] Pass the APILocations enumeration to use as the location associated with any analysis messages this method reports. To use the baseLocation as the location, pass APILocation_None.
validationOptions As Long
[In] Pass any of the ValidatePathOptions constants.