GetLibraryFullPath
This function provides a full path string to the IDEA library. By default it provides the string based on the macro's execution
context. Running on desktop delivers the path to the desktop project library. Running on server provides the UNC path to the
server project library.
Compatibility
Available as of IDEA version 10.1
Syntax
GetLibraryFullPath(libraryType As Integer, [optional] libraryLocation As Integer, [optional] globalLibrary As Boolean)
Parameters
libraryType
The following values are allowed:
EQUATIONS = 0,
IMPORT_DEFINITIONS = 1,
MACROS = 2,
OTHER = 3,
SOURCE_FILES = 4,
RESULTS = 5,
SMART_ANALYZER = 6,
CUSTOM_FUNCTIONS = 7,
EXPORTS = 8,
VISUALIZE = 9
libraryLocation
The following values are allowed:
Default = 0 'Default for Execution context
Local = 1 'Local library
Server = 2 'Server library
globalLibrary
Provides the path to the corresponding desktop or server global library. (Default = False)
Return Value
Local execution:
For a normal local library, the full library folder path is returned.
For a global local library, an empty string is returned.
For a server library (normal/global), a UNC folder path is returned.
If there is no connection to the server, an empty string is returned for a server library.
If the library type is out of range, an empty string is returned.
Server execution:
For a server library (normal/global), the folder path on server (not a UNC path) is returned.
For a local library (normal/global), an empty string is returned.
If the library type is out of range, an empty string is returned.
Example
Sub Main
Dim mc As Object
Dim sc As Object
Dim libName As String
Set mc = SmartContext.MacroCommands
Set sc = mc.SimpleCommands
libName = sc.GetLibraryFullPath(3) '3 - OTHER
SmartContext.Trace "Result: " + libName
Set sc = Nothing
Set mc = Nothing
End Sub