M-Files API 23.11.13135.0
GetPathInDefaultViewEx2 Method
VaultObjectFileOperations Object : GetPathInDefaultViewEx2 Method
The version of the object containing the file. Use "-1" for the latest version.
The file version. Use "-1" for the latest version.

If the target object exists with versions 1 and 2, the following table summarizes the L or S specific segments of the location path: 

Flag value Requested version 1 Requested version 2 Requested version -1

MFLatestSpecificBehaviorNormal

S/v1 L/L L/L

MFLatestSpecificBehaviorSpecific

S/v1 S/v2 S/v2

MFLatestSpecificBehaviorLatest

[error] L/L L/L

MFLatestSpecificBehaviorAutomatic

S/v1 L/L L/L

True if the information should be always updated from the server.
Description
Gets the path of the file in the ID view.
Syntax
Visual Basic
Public Function GetPathInDefaultViewEx2( _
   ByVal ObjVer As ObjVer, _
   ByVal FileVer As FileVer, _
   Optional ByVal LatestSpecificBehavior As MFLatestSpecificBehavior = MFLatestSpecificBehaviorAutomatic, _
   Optional ByVal UpdateFromServer As Boolean = False _
) As String
Parameters
ObjVer
The version of the object containing the file. Use "-1" for the latest version.
FileVer
The file version. Use "-1" for the latest version.
LatestSpecificBehavior
ValueDescription
MFLatestSpecificBehaviorAutomaticAutomatically chooses the LatestOnly behavior (L folder) if the object version is the latest version. Otherwise, it chooses the SpecificOnly behavior (S folder). Only one location is ever returned when using this method.
MFLatestSpecificBehaviorLatestReturns a location in the L (Latest) folder only. (Otherwise the latest version is shown in both the L and S folders.)
MFLatestSpecificBehaviorNormalNormal behavior can return locations in both the L and S folders.
MFLatestSpecificBehaviorSpecificReturns a location in the S (Specific) folder only, even if evaluating the latest version.

If the target object exists with versions 1 and 2, the following table summarizes the L or S specific segments of the location path: 

Flag value Requested version 1 Requested version 2 Requested version -1

MFLatestSpecificBehaviorNormal

S/v1 L/L L/L

MFLatestSpecificBehaviorSpecific

S/v1 S/v2 S/v2

MFLatestSpecificBehaviorLatest

[error] L/L L/L

MFLatestSpecificBehaviorAutomatic

S/v1 L/L L/L

UpdateFromServer
True if the information should be always updated from the server.
Remarks

This method returns a non-volatile path to the object; the path does not change even if the object properties change. This is the recommended path for opening an object file in an application, or for storing the path.

This method is available only if M-Files API is used in the client interface mode.

See Also

VaultObjectFileOperations Object  | VaultObjectFileOperations Members