Pause Module
Automation Interface
OMICRON Test Universe
Manual Version: PauAutInt.AE.1 - Year: 2012
© OMICRON electronics. All rights reserved.
This manual is a publication of OMICRON electronics GmbH.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming, optical
character recognition and/or storage in electronic data processing systems, requires the explicit consent of
OMICRON electronics.
Reprinting, wholly or in part, is not permitted. The product information, specifications, and technical data
embodied in this manual represent the technical status at the time of writing and are subject to change without
prior notice.
We have done our best to ensure that the information given in this manual is useful, accurate, up-to-date and
reliable. However, OMICRON electronics does not assume responsibility for any inaccuracies which may be
present.
The user is responsible for every application that makes use of an OMICRON product.
2
Contents
Contents
Pause Module Automation Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Application Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Application (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Document (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Name (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Parent (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Document Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Application (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Parent (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
InfoText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
GetInputText (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
LoadImage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
DeleteImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
SetSound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
SetFontHeight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3
OMICRON Test Universe
4
Pause Module Automation Interface
Pause Module Automation Interface
Object Hierarchy
Figure 1:
Object hierarchy of a
Pause Module
Document
5
OMICRON Test Universe
Reference
Application Object
The application object is the root of the OMICRON Pause object hierarchy. It is
the only object that can be created directly by other OLE Automation controllers
(e.g. MS Excel using CreateObject).
This object is unique within the OMICRON Pause Module. If you want to create
another Application object with CreateObject, a new instance of the OMICRON
Pause program is started to handle this object.
You can use this object as a starting point to navigate through the hierarchy tree.
You can get references to the Document Object (Document).
Properties
Application (read only)
Syntax: object.Application
Type: Object
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim obj As Object
Set obj = pauseApp.Application
' Free object references at the end of the
procedure
Set obj = Nothing
Set pauseApp = Nothing
Set otm = Nothing
6
Pause Module Automation Interface
Document (read only)
Syntax: object.Document
Type: Object (Document)
Description: This property returns a Document Object (Document).
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim doc As Object
Set doc = pauseApp.Document
' Free object references at the end of the
procedure
Set doc = Nothing
Set pauseApp = Nothing
Set otm = Nothing
Name (read only)
Syntax: object.Name
Type: String
Description: Returns the name of the application.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim Str As String
Set Str = pauseApp.Name
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
7
OMICRON Test Universe
Parent (read only)
Syntax: object.Parent
Type: Object
Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim obj As Object
Set obj = pauseApp.Parent
' Free object references at the end of the
procedure
Set obj = Nothing
Set pauseApp = Nothing
Set otm = Nothing
8
Pause Module Automation Interface
Visible
Syntax: object.Visible
Type: Boolean
Description: Shows/hides the main application window.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
'Is the application visible ?
If pauseApp.Visible then
MsgBox "Application is visible"
Else 'Make the application visible
pauseApp.Visible = TRUE
End If
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
Note: If you use an external OLE Automation controller (e.g. OMICRON Con-
trol Center) and you create the Application Object (Application) (and start the
OMICRON Pause Module application) you have to set the Visible property to
True to see the main window of the application.
9
OMICRON Test Universe
Methods
Quit
Syntax: object.Quit
Return None
type:
Description: This command quits the OMICRON Pulse Ramping
application and closes all open windows and the document.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
pauseApp.Quit
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
10
Pause Module Automation Interface
Document Object
With the Document Object (Document) you can control the document.
From this object you can get references to the ramps collection Object (Ramps)
(definition of the ramps)..
Properties
Application (read only)
Syntax: Object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim app As Application
Set app = pauseApp.Document.Application
' Free object references at the end of the
procedure
Set app = Nothing
Set pauseApp = Nothing
Set otm = Nothing
11
OMICRON Test Universe
Parent (read only)
Syntax: object.Parent
Type: Object
Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim obj As Object
Set obj = pauseApp.Document.Parent
' Free object references at the end of the
procedure
Set obj = Nothing
Set pauseApp = Nothing
Set otm = Nothing
12
Pause Module Automation Interface
InfoText
Syntax: object.InfoText
Type: String
Description: This property allows access (Get/Set) to the information /
instruction string which can be shown in the report.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
'Set info text
pauseApp.Document.InfoText = "This test is
simulated."
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
13
OMICRON Test Universe
Methods
GetInputText (read only)
Syntax: object.GetInputText
Type: String
Description: This method allows reading the user input string after test run.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim Str As String
'Get input text
Set Str = pauseApp.Document.GetInputText
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
14
Pause Module Automation Interface
LoadImage
Syntax: Object.LoadImage(PathString)
Type: Boolean
Description: This method loads an image. Parameter is the absolute path
and filename..
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim Result As Boolean
'Load an image
Set Result =
pauseApp.Document.LoadImage("D:\Image1.jpg")
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
DeleteImage
Syntax: Object.DeleteImage
Type: None
Description: This method deletes an existing image.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
'Delete image
pauseApp.Document.DeleteImage
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
15
OMICRON Test Universe
SetSound
Syntax: Object.SetSound(integer)
Type: None
Description: This method sets or resets the sound notification. Parameter
1 = set,
Parameter 0 = reset..
Example: Dim otm As Object
Dim dist As Object
Set otm =
Document.InsertObject(“OMADist.Document”)
Set dist = otm.Specific
'Remove all shots
dist.Document.RemoveAllShots
SetFontHeight
Syntax: Object.SetFontHeight(integer)
Type: None
Description: This method sets the height of the font in logical units for the
user information. In this case the font will be the default
system font. Positive or negative values are possible.
Example: Dim otm As Object
Dim pauseApp As Object
Set otm =
Document.InsertObject("OMPause.Document")
Set pauseApp = otm.Specific
Dim Result As Boolean
'Set font height
pauseApp.Document.SetFontHeight(20)
' Free object references at the end of the
procedure
Set pauseApp = Nothing
Set otm = Nothing
16