CasewareDocs

GetKnownLocationPath

Record definition files should be added to an app definition as auxiliary files. During the import these files are deployed into a well-known location of SmartAnalyzer. This macro command obtains the path of such a location.

Compatibility

Available as of IDEA version 10.2

Syntax

GetKnownLocationPath(locationType as Integer) as String

Parameter

locationType

Type of well-known location, see values of enum KnownLocation below.

Return Value

Absolute path of well-known location on local workstation.

Note

This command throws an exception when called on a server.

enum KnownLocation is defined as:

public enum KnownLocation

{

' Location is not a known folder or irrelevant

Unknown = 0,

' Installation folder of SmartAnalyzer

Install = 1,

' Templates folder of SmartAnalyzer

Templates = 2

'User roaming profile folder for SmartAnalyzer

UserRoamingProfile = 3,

'Location of the reporting Plug-ins that come via setup

InstallReportingPlugins = 4,

'Location of the reporting Plug-ins that come via import

UserReportingPlugins = 5,

'Location of Data Request template files that come via setup

InstallDataRequests = 6,

'Location of Data Request template files that come via import

UserDataRequests = 7,

'Location of documentation files that come via setup

InstallDocumentationFiles = 8,

'Location of documentation files that come via import

UserDocumentationFiles = 9,

'Location of additional app-related files that come via setup

InstallAppAuxiliaryFiles = 10,

'Location of additional app-related files that come via import

UserAppAuxiliaryFiles = 11,

'User caches folder

UserCaches = 12,

'FilterParameters folder

FilterParameters = 13,

'Location of link files used in descriptions

LinkedFiles = 14,

'Location of external description files

DescriptionFiles = 15,

'Location of central deployment folder

CentralDeployment = 16;

'Location of user defined standard journal templates

StandardJournalTemplates = 17,

'All users roaming profile folder

AllUsersRoamingProfile = 18

'User logs folder

UserLogs = 19,

'User import logs folder

UserImportLogs = 20

}

To specify a new location for auxiliary files, the value UserAppAuxiliaryfiles = 11 has to be used.

Example

Option Explicit 
Dim oSC As Object
Dim auxFilesRootPath As String
Dim myBinFilePath As String

Sub Main
Set oSC = SmartContext.MacroCommands.SimpleCommands
auxFilesRootPath = oSC.GetKnownLocationPath(11) 'UserAppAuxiliaryFiles
myBinFilePath = auxFilesRootPath + "\MyBinFiles\MyBinFile.bin"

'Now use myBinFilePath for any purpose
End Sub

In this example it is assumed that the auxiliary file "MyBinFile.bin" was added to the app definition and the deployment location "MyBinFiles" was specified for this file.

GetKnownLocationPath | Caseware Docs