Getting the path to a project folder
If you want to get the path to a project folder from a UNICOM Intelligence Interviewer - Server Admin activity, for example, because you want to access the .mdd file for a project, you can do so by adding the following code to your program:
' On execution of this code:
' 1. folderPath will contain the path to the project folder.
' 2. mddFileName will contain the name and location of the
' project's .mdd file.
' Note: ProjectName must contain the name of the project.
Dim folderPath as String
Dim oFMAdmin As New MRFILEMGTLib.FMAdminClass
Dim mddFileName as String
folderPath = oFMAdmin.GetFolder( _
oAgent.UserName, _
oAgent.Ticket, _
ProjectName, _
MRFILEMGTLib.tag_MRFM_FOLDER_TYPE.FT_USER_PROJECT_ROOT, _
MRFILEMGTLib.tag_MRFM_FOLDER_ACCESSTYPE.FAT_DEFAULT, _
MRFILEMGTLib.tag_MRFM_FOLDER_CREATEOPTION.FCO_CREATEIFNOTEXIST)
folderPath = oFMAdmin.ResolveFolderName( _
oAgent.UserName, _
oAgent.Ticket, _
folderPath, _
MRFILEMGTLib.tag_MRFM_FOLDER_ACCESSTYPE.FAT_DEFAULT)
mddFileName = folderPath + "\" + ProjectName + ".mdd"
By default, a local folder name will be returned if the project folder is on the same computer, and a shared folder name will be returned if the project folder is on a different computer. However, you can specify that you always want local or shared folder names to be returned by using the appropriate value of tag_MRFM_FOLDER_ACCESSTYPE. See IFMAdmin.ResolveFolderName for more information.
See also