GetString4Machine
Gets a global parameter of type String specified by name for the company/machine.
Compatibility
Available as of IDEA version 10.1
Syntax
GetString4Machine(paramName As String) As String
Parameters
paramName
Global parameter name
Return values
Value of String parameter.
If the parameter cannot be found, an error will be raised.
If a parameter with a specified name is present but has a type other than String, an error will be raised.
Example
Sub Main()
Dim mc As Object
Dim sc As Object
Dim parameterizer As Object
Dim stringValue As String
Dim boolValue As Boolean
Dim dateTimeValue As Date
Dim intValue As Integer
Dim floatValue As Double
Dim objValue As Object
Dim periodValue As Object
Dim formattedValue As String
Set mc = SmartContext.MacroCommands
Set sc = mc.SimpleCommands
Set parameterizer = mc.GlobalParameters
' Getting String value for audit folder
stringValue = parameterizer.GetString4AuditFolder("TestDataEx", "TypedStringVal")
' Getting Boolean value for project recursively
boolValue = parameterizer.GetBoolean4Project("TypedBooleanVal", True)
' Getting Date value for app workflow
Set dateTimeValue = parameterizer.GetDateTime4App("TypedDateTimeVal")
' Getting Integer value for audit folder recursively
intValue = parameterizer.GetInteger4AuditFolder("TestDataEx", "TypedIntegerVal", True)
' Getting Double value for company
floatValue = parameterizer.GetFloat4Machine("TypedFloatVal")
' Getting Object value for project
Set objValue = parameterizer.GetObject4Project("TypedObjectVal")
' Getting Period value for app workflow recursively
Set periodValue = parameterizer.GetPeriod4App("TypedPeriodVal", True)
formattedValue = sc.FormatString("{0:s}-{1:s}", periodValue.From, periodValue.To)
End Sub