ValidatePath Method

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

AnalysisUtilities.ValidatePath ( Path, baseLocation, apiLocation, validationOptions)

Return Value

Boolean

Purpose

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.

Parameters

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.


See Also

AnalysisUtilities.AutomaticPropertyCheckingEnabled

AnalysisUtilities.ValidateExpression

APILocations

ValidatePathOptions

WAS THIS ARTICLE HELPFUL?

Not Helpful