Professional Documents
Culture Documents
Pgina 1 de 12
Application
The QlikView program
Method Detail
ActiveDocument
Document ActiveDocument()
CreateDoc
Document CreateDoc()
CreateEmptyReport
IReport CreateEmptyReport()
DisableCtlBrk
DisableCtlBrk()
EnableCtlBrk
EnableCtlBrk()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 2 de 12
GetAffinity
Integer GetAffinity(Integer CoreNo)
Returns affinity status for a specified core. For debug use only!!
Parameters:
CoreNo (Integer)
Returns:
Returns affinity status for a specified core
0 = off
1 = on
-1 = non-existing core number
Earliest version:
8.01
Example:
i = Activedocument.GetApplication.GetAffinity 1
GetCachePercentage
Integer GetCachePercentage()
Returns object cache as percentage of total RAM. For debug use only!!
Earliest version:
8.01
Example:
msgbox(Activedocument.GetApplication.GetCachePercentage)
GetCommittedMemory
Double GetCommittedMemory()
GetCpuMilliseconds
Double GetCpuMilliseconds()
GetElapsedMilliseconds
Double GetElapsedMilliseconds()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 3 de 12
GetEmptyRect
IRect GetEmptyRect()
GetMajorVersionDate
String GetMajorVersionDate()
GetProcessId
Integer GetProcessId()
GetProperties
IApplicationProperties GetProperties()
GetRunLevel
short GetRunLevel()
GetServerDocList
IArrayOfDocListEntry GetServerDocList(String Server)
Returns:
List of available documents on from a QlikView Server returned
Earliest version:
6.0x
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 4 de 12
Example:
set app = ActiveDocument.GetApplication
set docs = app.GetServerDocList("qvp://@www.qliktech.com")
for i = 0 to docs.Count-1
set doc = docs.Item(i)
msgbox(doc.DocName)
msgbox(doc.FileSize)
msgbox(doc.Filetime)
next
GetSolidColorArea
IColorAreaDef GetSolidColorArea(Byte Red, Byte Green, Byte Blue)
'red
GetTotalPhysicalMemory
Double GetTotalPhysicalMemory()
GetUserPreferences
IUserPreferences GetUserPreferences()
InputBox
String InputBox(String label, String DefaultValue)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 5 de 12
// JScript
function Test()
{
personName = ActiveDocument.GetApplication.InputBox("What is you name?")
msg = "Hello " + personName + " !"
qvlib.MsgBox(msg)
}
InputBoxEx
String InputBoxEx(String label, String DefaultValue)
Launch
Boolean Launch(String Application, String Parameters)
launch
Returns:
No return value
Earliest version:
4.0x
Example:
rem ** Example 1 **
set app= ActiveDocument.GetApplication
app.Launch "C:\Program Files\Winword.exe","C:\Myfiles\abc.doc"
LoadNewerDoc
Boolean LoadNewerDoc()
Replaces active (remote) document with newer version on server, if one exists.
Earliest version:
8.00
Example:
ActiveDocument.GetApplication.GetNewerDoc
MsgBox
Integer MsgBox(String str, Integer type)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 6 de 12
3 = ABORT
4 = RETRY
5 = IGNORE
6 = YES
7 = NO
Earliest version:
6.0x
Example:
ActiveDocument.GetApplication.MsgBox("Hello world")
OpenDoc
Document OpenDoc(String DocName, String UserName, String Password, String Serial)
Returns:
QlikView document returned
Earliest version:
4.0x
Example:
rem ** VBScript **
set App = ActiveDocument.GetApplication
set newdoc = App.OpenDoc ("C:\MyDocuments\QV4Automation.qvw","","")
set App = ActiveDocument.GetApplication
App.OpenDoc "C:\MyDocuments\Budget.qvw","JNN","123456"
rem ** Visual Basic **
dim App as New QlikView.Application
set newdoc = App.OpenDoc ("C:\MyDocuments\Budget.qvw","JN","123456")
OpenDocEx
Document OpenDocEx(String DocName, short AccessMode, Boolean AllowDialog, String UserName, String Password, String Serial, Boolean NoData, Boolean UseD
0 = unspecified
1 = admin
2 = user
AllowDialog (Boolean) : True if error messages to appear
UserName (String) : Section access user name to be used
Password (String) : Section access password to be used
Serial (String) : Section access serial number to be used
NoData (Boolean) :
UseDocStartState (Boolean) :
Returns:
QlikView document returned
Earliest version:
6.0x
Example:
set App = ActiveDocument.GetApplication
App.OpenDocEx "C:\MyDocuments\Budget.qvw",2,false,"jnn","123456","",false
OSName
String OSName()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 7 de 12
OSVersion
String OSVersion()
PerformLef
Boolean PerformLef()
PerformRegistration
Boolean PerformRegistration()
QTProduct
String QTProduct()
Quit
Quit(Integer ExitCode)
Returns:
No return value
Earliest version:
4.0x
Example:
rem ** quit QlikView **
ActiveDocument.GetApplication.Quit
QvVersion
String QvVersion()
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 8 de 12
Example:
rem ** show current QV version **
msgbox(ActiveDocument.GetApplication.QvVersion)
Refresh
Refresh()
RemoveAllBuffers
Integer RemoveAllBuffers()
RevokeClassObjects
RevokeClassObjects()
Revokes class factories for QlikView Automation thereby detaching the current instance and opening up for additional instances of QlikView to act as
Automation servers.
Earliest version:
7.00
Example:
ActiveDocument.GetApplication.RevokeClassObjects
ScreenHeight
Integer ScreenHeight()
ScreenWidth
Integer ScreenWidth()
SetAffinity
Integer SetAffinity(Integer CoreNo, Integer Mode)
Sets affinity status for a specified core. For debug use only!!
Parameters:
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 9 de 12
(0 based)
1 = turn on
Returns:
Returns status after operation
0 = off
1 = on
-1 = non-existing core number
Earliest version:
8.01
Example:
Activedocument.GetApplication.SetAffinity 1,1
'turns on core#2
SetCachePercentage
SetCachePercentage(Integer Percentage)
Sets object cache as percentage of total RAM. For debug use only!!
Parameters:
Percentage (Integer)
Returns:
No return value
Earliest version:
8.01
Example:
Activedocument.GetApplication.SetCachPercentage 15
SetProperties
SetProperties(IApplicationProperties Properties)
Returns:
No return value
Earliest version:
4.0x
Example:
set QVProp = ActiveDocument.GetApplication.GetProperties
QVProp.UserID="John"
ActiveDocument.GetApplication.SetProperties QVProp
SetUserPreferences
SetUserPreferences(IUserPreferences Preferences)
Returns:
No return value
Earliest version:
4.0x
Example:
set UP = ActiveDocument.GetApplication.GetUserPreferences
UP.ConfirmPurge = true
ActiveDocument.GetApplication.SetUserPreferences UP
ShowBookmarksBar
ShowBookmarksBar(Integer Mode)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 10 de 12
2 = docked left
3 = docked bottom
4 = docked right
5 = floating
Returns:
No return value
Earliest version:
7.00
Example:
ActiveDocument.GetApplication.ShowBookmarksBar 1
ShowDesignBar
ShowDesignBar(Integer Mode)
ShowMenuBar
ShowMenuBar(Integer Mode)
ShowNavigationBar
ShowNavigationBar(Integer Mode)
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 11 de 12
ShowSelectionWindow
Boolean ShowSelectionWindow(Boolean Show)
ShowSheetsBar
ShowSheetsBar(Integer Mode)
ShowStandardBar
ShowStandardBar(Integer Mode)
ShowStatusBar
ShowStatusBar(Boolean Show)
'hide
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016
Application
Pgina 12 de 12
Sleep
Sleep(Integer MilliSec)
Returns:
No return value
Earliest version:
4.0x
Example:
rem ** let QV sleep for 10 seconds **
ActiveDocument.GetApplication.Sleep 10000
WaitForIdle
Boolean WaitForIdle(Integer MilliSecTimeout)
Holds macro execution until all layout entities have been updated.
Parameters:
MilliSecTimeout (Integer)
: Optional timeout in milliseconds after which macro execution will resume regardless of idle state or not
Returns:
True returned if idle state was reached (no timeout)
Earliest version:
7.51
Example:
ActiveDocument.GetApplication.WaitForIdle
file:///C:/Users/Opss/Downloads/QlikViewAPI_html/Application.htm
17/03/2016