0% found this document useful (0 votes)
784 views144 pages

DataAnalysis Script Reference Manual

DataAnalysis Script Reference Manual, Version 3. (April 2005) Bruker Daltonik GmbH makes no warranty of any kind with regard to this material.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
784 views144 pages

DataAnalysis Script Reference Manual

DataAnalysis Script Reference Manual, Version 3. (April 2005) Bruker Daltonik GmbH makes no warranty of any kind with regard to this material.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
  • Preface
  • Automation Objects and Object Hierarchy
  • Automation Properties
  • Automation Methods
  • Automation Events
  • Index

Script Reference Manual

COPYRIGHT

Copyright 2005
Bruker Daltonik GmbH
All other trademarks are the sole property of their respective owners.

All Rights Reserved


Reproduction, adaptation, or translation without prior written permission is prohibited,
except as allowed under the copyright laws.

Document History
DataAnalysis Script Reference Manual, Version 3.3 (April 2005)
Part #: 223451 DataAnalysis Script Reference Manual
First edition: March 2004
Printed in Germany

Warranty
The information contained in this document is subject to change without notice.
Bruker Daltonik GmbH makes no warranty of any kind with regard to this material,
including, but not limited to, the implied warranties of merchantability and fitness for a
particular purpose.
Bruker Daltonik GmbH shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing, performance or use of this
material.
Bruker Daltonik GmbH assumes no responsibility for the use or reliability of its software
on equipment that is not furnished by Bruker Daltonik GmbH.

Bruker Daltonik GmbH


Fahrenheitstrasse 4
28359 Bremen
Germany
Phone: +49 (421) 2205-445
FAX: +49 (421) 2205-370
Email: [Link]@[Link]
Internet: http:\\[Link]

ii DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Contents

CONTENTS
1 PREFACE ............................................................................................................................. 1-1
1.1 What's New in DataAnalysis 3.3 Automation ?.......................................................... 1-1

2 AUTOMATION OBJECTS AND OBJECT HIERARCHY..................................................... 2-1


2.1 Object Hierarchy ........................................................................................................ 2-1
2.2 Analyses Object ......................................................................................................... 2-4
2.3 Analysis Object .......................................................................................................... 2-5
2.4 Application Object ...................................................................................................... 2-6
2.5 Chromatogram Object................................................................................................ 2-7
2.6 ChromatogramDefinition Objects............................................................................... 2-8
2.7 Chromatograms Object............................................................................................ 2-10
2.8 Compound Object .................................................................................................... 2-11
2.9 Compounds Object .................................................................................................. 2-13
2.10 Form Object ............................................................................................................. 2-14
2.11 GenerateFormulaParameters Object....................................................................... 2-14
2.12 LibrarySearchResult Object ..................................................................................... 2-15
2.13 LibrarySearchResults Object ................................................................................... 2-16
2.14 MSFilter Object ........................................................................................................ 2-17
2.15 MSPeak Object ........................................................................................................ 2-18
2.16 MSPeakList Object .................................................................................................. 2-19
2.17 Properties Object ..................................................................................................... 2-20
2.18 Spectra Object ......................................................................................................... 2-21
2.19 Spectrum Object ...................................................................................................... 2-21
2.20 SumFormula Object ................................................................................................. 2-23
2.21 Variable Object ........................................................................................................ 2-24
2.22 Variables Object....................................................................................................... 2-25

3 AUTOMATION PROPERTIES.............................................................................................. 3-1


3.1 Active Property........................................................................................................... 3-6
3.2 ActiveAnalysis Property ............................................................................................. 3-7
3.3 Algorithm Property ..................................................................................................... 3-7
3.4 ApplyNitrogenRule Property ...................................................................................... 3-8
3.5 Area Property ............................................................................................................. 3-8
3.6 AutoSearchMonoIsotopicPeak Property.................................................................... 3-9
3.7 AverageMass Property .............................................................................................. 3-9
3.8 BackgroundType Property ....................................................................................... 3-10
3.9 BaselineEndIntensity Property................................................................................. 3-10
3.10 BaselineStartIntensity Property................................................................................ 3-11
3.11 CASRegistryNumber Property ................................................................................. 3-11
3.12 Charge Property....................................................................................................... 3-11
3.13 ChargeState Property .............................................................................................. 3-12
3.14 Chromatogram Property .......................................................................................... 3-12
3.15 Comment Property................................................................................................... 3-13

DataAnalysis Script Reference Manual, Version 3.3 iii


Contents Bruker Daltonik GmbH

3.16 CompoundComment Property ................................................................................. 3-13


3.17 CompoundName Property ....................................................................................... 3-13
3.18 Count Property ......................................................................................................... 3-14
3.19 DateCreated Property .............................................................................................. 3-15
3.20 DeconvolutedMolweight Property ............................................................................ 3-15
3.21 DeconvolutionComponent Property......................................................................... 3-15
3.22 Definition Property ................................................................................................... 3-16
3.23 DoubleBondEquivalenceMaximum Property ........................................................... 3-16
3.24 DoubleBondEquivalenceMinimum Property ............................................................ 3-17
3.25 ElectronConfiguration Property................................................................................ 3-17
3.26 ElementalCounts Property ....................................................................................... 3-18
3.27 Filename Property.................................................................................................... 3-19
3.28 FirstMass Property................................................................................................... 3-20
3.29 FirstRetentionTime Property .................................................................................... 3-20
3.30 Fit Property............................................................................................................... 3-21
3.31 Formula Property ..................................................................................................... 3-21
3.32 FragmentationPath Property.................................................................................... 3-22
3.33 FullName Property ................................................................................................... 3-22
3.34 Group Property ........................................................................................................ 3-23
3.35 GroupName Property............................................................................................... 3-24
3.36 HasIdentifiedMS Property ........................................................................................ 3-24
3.37 HasIdentifiedMSMS Property................................................................................... 3-25
3.38 HasIdentifiedNegativePolarity Property ................................................................... 3-25
3.39 HasIdentifiedPositivePolarity Property..................................................................... 3-26
3.40 HasLibrarySearchResults Property ......................................................................... 3-26
3.41 HCRatioMaximum Property ..................................................................................... 3-27
3.42 HCRatioMinimum Property ...................................................................................... 3-27
3.43 Height Property ........................................................................................................ 3-27
3.44 InstrumentName Property........................................................................................ 3-28
3.45 Intensity Property ..................................................................................................... 3-28
3.46 IsChromatographicAnalysis Property ...................................................................... 3-29
3.47 LastMass Property ................................................................................................... 3-29
3.48 LastRetentionTime Property .................................................................................... 3-30
3.49 LibraryNames Property ............................................................................................ 3-30
3.50 Logging Property...................................................................................................... 3-31
3.51 LowerBoundaryFormula Property............................................................................ 3-31
3.52 m_over_z Property................................................................................................... 3-32
3.53 Mass Property .......................................................................................................... 3-32
3.54 MaximumIntensity Property ..................................................................................... 3-33
3.55 MinimumIntensity Property ...................................................................................... 3-34
3.56 MolWeight Property ................................................................................................. 3-34
3.57 MonoIsotopicMass Property .................................................................................... 3-34
3.58 MSFilter Property ..................................................................................................... 3-35
3.59 MSPeakList Property ............................................................................................... 3-36
3.60 Name Property ......................................................................................................... 3-36
3.61 NominalMass Property............................................................................................. 3-37
3.62 NumberOfFormula Property..................................................................................... 3-38
3.63 Path Property ........................................................................................................... 3-38

iv DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Contents

3.64 PeakEnd Property.................................................................................................... 3-39


3.65 PeakEndIntensity Property ...................................................................................... 3-39
3.66 PeakStart Property................................................................................................... 3-40
3.67 PeakStartIntensity Property ..................................................................................... 3-40
3.68 Polarity Property ...................................................................................................... 3-40
3.69 Purity Property ......................................................................................................... 3-41
3.70 Range Property........................................................................................................ 3-41
3.71 RetentionTime Property ........................................................................................... 3-42
3.72 RetentionTimeEnd Property..................................................................................... 3-43
3.73 RetentionTimeOffset Property ................................................................................. 3-43
3.74 RetentionTimeStart Property ................................................................................... 3-43
3.75 RFit Property ............................................................................................................ 3-44
3.76 SampleInfo Property ................................................................................................ 3-44
3.77 ScanMode Property ................................................................................................. 3-45
3.78 ScriptVariable Property ............................................................................................ 3-45
3.79 SearchMass Property .............................................................................................. 3-46
3.80 SearchRange Property ............................................................................................ 3-46
3.81 SeparationType Property ......................................................................................... 3-47
3.82 SequenceNumbers Property.................................................................................... 3-47
3.83 SignalToNoise Property ........................................................................................... 3-48
3.84 Size Property............................................................................................................ 3-48
3.85 SpectrumComment Property ................................................................................... 3-49
3.86 SpectrumInfo Property ............................................................................................. 3-49
3.87 SumIntensity Property.............................................................................................. 3-49
3.88 Tolerance Property .................................................................................................. 3-50
3.89 Type Property........................................................................................................... 3-50
3.90 Unit Property ............................................................................................................ 3-51
3.91 UpperBoundaryFormula Property............................................................................ 3-51
3.92 Value Property ......................................................................................................... 3-52
3.93 VariableName Property............................................................................................ 3-52
3.94 Version Property ...................................................................................................... 3-53
3.95 Visible Property........................................................................................................ 3-53
3.96 Width Property ......................................................................................................... 3-54
3.97 WidthLeft, WidthRight Property................................................................................ 3-54

4 AUTOMATION METHODS................................................................................................... 4-1


4.1 Activate Method ......................................................................................................... 4-4
4.2 Add Method................................................................................................................ 4-5
4.3 AddChromatogram Method........................................................................................ 4-6
4.4 AddChromatogramRangeSelection Method .............................................................. 4-8
4.5 AddChromatograms Method...................................................................................... 4-9
4.6 AddRangeSelection Method .................................................................................... 4-10
4.7 AverageMassSpectrum Method............................................................................... 4-11
4.8 BaselineSubtract Method......................................................................................... 4-11
4.9 Caption Method........................................................................................................ 4-12
4.10 ChromatogramData Method .................................................................................... 4-12
4.11 Clear Method............................................................................................................ 4-14

DataAnalysis Script Reference Manual, Version 3.3 v


Contents Bruker Daltonik GmbH

4.12 ClearChromatogramRangeSelections Method ........................................................ 4-14


4.13 ClearRangeSelections Method ................................................................................ 4-14
4.14 ClearResults Method ............................................................................................... 4-15
4.15 Close Method ........................................................................................................... 4-16
4.16 Deconvolute Method ................................................................................................ 4-16
4.17 DeleteCompound Method ........................................................................................ 4-17
4.18 DeletePeak Method ................................................................................................. 4-17
4.19 DeleteScriptTable Method ....................................................................................... 4-18
4.20 DoEvents Method .................................................................................................... 4-19
4.21 ElementalComposition Method ................................................................................ 4-19
4.22 Enable Method......................................................................................................... 4-20
4.23 Export Method.......................................................................................................... 4-21
4.24 ExportMassList Method ........................................................................................... 4-22
4.25 FindAutoMSn Method .............................................................................................. 4-23
4.26 FindCompounds Method.......................................................................................... 4-23
4.27 FindDissect Method ................................................................................................. 4-24
4.28 FindMSn Method...................................................................................................... 4-25
4.29 GenerateFormula Method........................................................................................ 4-25
4.30 Hide Method............................................................................................................. 4-26
4.31 HideMenu Method.................................................................................................... 4-27
4.32 Identify Method ........................................................................................................ 4-27
4.33 IntegrateOnly Method .............................................................................................. 4-28
4.34 Item Method ............................................................................................................. 4-28
4.35 LoadMethod Method ................................................................................................ 4-29
4.36 MascotSearch Method ............................................................................................. 4-30
4.37 MassListClear Method ............................................................................................. 4-30
4.38 MassListFind Method............................................................................................... 4-31
4.39 Maximize Method..................................................................................................... 4-31
4.40 Minimize Method...................................................................................................... 4-32
4.41 Noise Method ........................................................................................................... 4-32
4.42 Open Method ........................................................................................................... 4-34
4.43 Pattern Method ........................................................................................................ 4-34
4.44 Print Method............................................................................................................. 4-35
4.45 PrintToPDF Method ................................................................................................. 4-36
4.46 RecalibrateExternal Method..................................................................................... 4-37
4.47 RecalibrateInternal Method...................................................................................... 4-37
4.48 RelatedCompounds Method .................................................................................... 4-38
4.49 Restore Method ....................................................................................................... 4-39
4.50 RunScript Method .................................................................................................... 4-39
4.51 Save Method ............................................................................................................ 4-40
4.52 SendReport Method................................................................................................. 4-40
4.53 SetScriptTableCellText Method ............................................................................... 4-41
4.54 SetScriptTableColumnHeader Method .................................................................... 4-43
4.55 Show Method ........................................................................................................... 4-43
4.56 ShowMenu Method .................................................................................................. 4-44
4.57 Smooth Method........................................................................................................ 4-44
4.58 SpectrumData Method ............................................................................................. 4-45
4.59 Subtract Method....................................................................................................... 4-46

vi DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Contents

5 AUTOMATION EVENTS ...................................................................................................... 5-1

Index ............................................................................................................................ I-1

DataAnalysis Script Reference Manual, Version 3.3 vii


Contents Bruker Daltonik GmbH

viii DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Preface

1 PREFACE
The Bruker Daltonics DataAnalysis 3.3 application (in the following ‘DataAnalaysis’)
can be controlled programmatically by manipulating it through Automation (formerly
OLE Automation). For example, in a Visual Basic Script, you can control an open ana-
lysis by manipulating its corresponding Analysis object.
The DataAnalysis object model enables you to automate analysis processing tasks.
This object model consists of the hierarchy of DataAnalysis objects, and their asso-
ciated properties, methods and events.
This manual describes each object, along with its properties, methods and events.

1.1 What's New in DataAnalysis 3.3 Automation ?


Changes compared to DataAnalysis 3.2:
• New automation objects: Variable, Variables, LibrarySearchResult, LibrarySearch-
Results.
• New automation properties: AutoSearchMonoIsotopicPeak, ElementalCounts,
ApplyNitrogenRule, ElectronConfiguration.
• New automation methods: ChromatogramData, SpectrumData, ElementalCompo-
sition, RelatedCompounds, SendReport, PrintToPDF, Show, Hide.
• Fix: Charge deconvolution through automation was not applying the 'Allow precursor
deconvolution from fragment spectra' parameter.
• Scripts in AutomationEngine support global variables from DataAnalysis (starting
with 'da...'), e.g., daBgrdTypeSpectral.

DataAnalysis Script Reference Manual, Version 3.3 1-1


Preface Bruker Daltonik GmbH

1-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2 AUTOMATION OBJECTS AND OBJECT


HIERARCHY

2.1 Object Hierarchy


Each DataAnalysis object implements a dual interface through which you can mani-
pulate the object. Each object implements an IDispatch interface for Automation and a
Component Object Model (COM) interface for direct access to object members (proper-
ties, methods, events).

Overview of each DataAnalysis object


Each DataAnalysis object is described below.
Object Represents
Analyses All open analyses; a collection of Analysis
objects.
Analysis An open analysis.
Application The DataAnalysis application.
Chromatogram A chromatogram of an analysis.
ChromatogramDefinition objects
TICChromatogramDefinition ChromatogramDefinition object for Total Ion
Chromatograms.
EICChromatogramDefinition ChromatogramDefinition object for Extracted
Ion Chromatograms.
BPCChromatogramDefinition ChromatogramDefinition object for Base
Peak Chromatograms.
CNLChromatogramDefinition ChromatogramDefinition object for Constant
Neutral Loss Chromatograms.
MassPosChromatogramDefinition ChromatogramDefinition object for Mass
Position Chromatograms.
UVChromatogramDefinition ChromatogramDefinition object for 1D UV
Chromatograms.
UV2DChromatogramDefinition ChromatogramDefinition object for extracted
chromatograms of a 2D UV data file.
VARChromatogramDefinition ChromatogramDefinition object for
Acquisition Parameter Chromatograms.

DataAnalysis Script Reference Manual, Version 3.3 2-1


Automation Objects Bruker Daltonik GmbH

Chromatograms All chromatograms of an analysis; a collection


of Chromatogram objects.
Compound A compound of a chromatogram analysis; a
collection of Spectrum objects.
Compounds All compounds of a chromatogram analysis; a
collection of Compound objects.
Form The script form in the AutomationEngine and in
DataAnalysis.
GenerateFormulaParameters Defines all parameters used for generating sum
formulas from a specified region of a mass
spectrum.
LibrarySearchResult The library search result of a compound or
mass spectrum for a chromatogram analysis,
resp. spectrum analysis.
LibrarySearchResults All library search results of a compound or
spectrum from a chromatogram analysis, resp.
spectrum analysis; a collection of
LibrarySearchResult objects.
MSFilter Defines mass spectrum specific information of
a ChromatogramDefinition object.
MSPeak A peak of a mass spectrum.
MSPeakList All peaks of a mass spectrum (= Mass List); a
collection of one or more MSPeak objects.
Properties Represents an open analysis.
Spectra All mass spectra of a mass spectrum analysis;
a collection of Spectrum objects.
Spectrum A mass spectrum of a mass spectrum analysis
or a compound of a chromatogram analysis.
SumFormula A sum formula of a chemical compound.
Variable A variable item of the Variables collection
class.
Variables The variable table of a Spectrum object.

DataAnalysis object hierarchy for automation


To manipulate DataAnalysis objects, you must know the relationships between them.
The Application object is at the top, and the other objects are subordinate to it. This
relationship allows you to directly access objects subordinate to the Application object
by using the properties and methods of the Application object. The Form object is not

2-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

related to the other objects. It is used to control the VBScripting form in the Automation-
Engine and in DataAnalysis.
The "has-a" tree is shown below. For example, the Analyses object has, as one of its
properties, an Analysis object.
Application
Application (Application is its own parent)
Analyses
Analysis
Properties
Chromatograms (for "Chromatogram" analysis types)
Chromatogram
Definition (gets a ChromatogramDefinition object)
Compounds (for "Chromatogram" analysis types)
Compound
Spectrum
MSPeakList
MSPeak
Variables
Variable
LibrarySearchResults
LibrarySearchResult
Spectra (for "MassSpectrum" analysis types and averaged
spectrum entries in the Compound Mass List)
Spectrum
MSPeakList
MSPeak
Variables
Variable
LibrarySearchResults
LibrarySearchResult
ChromatogramDefinition___
GenerateFormulaParameters
MSFilter
SumFormula
Form

DataAnalysis Script Reference Manual, Version 3.3 2-3


Automation Objects Bruker Daltonik GmbH

Implied objects
The Analysis, the Application, and the Form objects are the topmost objects for a
script running in DataAnalysis. These objects are implicitly available in the VBScript in
DataAnalysis. The Form object is the topmost object in the AutomationEngine. This
object is also implicitly available in the VBScript in the AutomationEngine.

2.2 Analyses Object


The Analyses object represents all open analyses. The Analyses object is a collection
of one or more Analysis objects.

The Analyses object has the following objects, properties and methods:

Objects

Properties
ActiveAnalysis
Count

Methods
Item
Open

The Analyses object is a collection object that contains all Analysis objects. To find a
particular object, iterate through the collection by using the Analyses object of the
Application object. Consider the following code snippet from a DataAnalysis Script.
Dim myAnalysis
set Application = GetObject("",
"[Link]")
For Each myAnalysis in [Link]
' Access myAnalysis here.
' For example:
MsgBox [Link]
Next

See Also
Analysis object

2-4 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.3 Analysis Object


The Analysis object represents an open analysis.

The Analysis object has the following objects, properties and methods:

Objects
Chromatograms Properties
Compounds Spectra

Properties
Active Path
FullName ScriptVarable
IsChromatographicAnalysis Type
Name

Methods
AddChromatogramRangeSelection Print
ClearChromatogramRangeSelections PrintToPDF
ClearResults RecalibrateExternal
Close RecalibrateInternal
DeleteScriptTable RunScipt
FindAutoMSn Save
FindDissect SendReport
FindMSn SetScriptTableCellText
LoadMethod SetScriptTableColumnHeader
MascotSearch

Each open analysis in DataAnalysis is represented by an Analysis object. This object


has members (properties, methods, and events) that you can use to process the
analysis.
The Analysis object is a top-most object in a script running in DataAnalysis. You can
access the Analysis object directly by its name.
All open analyses belong to the analyses collection represented by the Analyses
object. You can find a particular analysis by iterating through this collection.

DataAnalysis Script Reference Manual, Version 3.3 2-5


Automation Objects Bruker Daltonik GmbH

2.4 Application Object


The Application object represents DataAnalysis and is the topmost object in the Data-
Analysis object hierarchy. From the Application object, you can directly access other
DataAnalysis objects by using the Application object's properties and methods, or you
can indirectly access objects through other objects obtained by these properties and
methods.
The Application object is also the first object being opened and accessed when using
the AutomationEngine. When running the script in DataAnalysis both the Application
object and the Analysis object are implicitly available.

The Application object has the following objects, properties and methods:
Objects
Analyses

Properties
Active Path
FullName Version
Logging Visible
Name

Methods
Activate Show
Hide

The Application object is a top-most object in a script running in DataAnalysis. You


can access the Application object directly by its name.

2-6 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.5 Chromatogram Object


The Chromatogram object represents a chromatogram defined for an analysis.

The Chromatogram object has the following objects, properties and methods:
Objects

Properties
Definition MinimumIntensity
FirstRetentionTime Name
Intensity RetentionTime property
LastRetentionTime Size
MaximumIntensity

Methods
AddRangeSelection FindCompounds
AverageMassSpectrum IntegrateOnly
ChromatogramData Noise
ClearRangeSelections RelatedCompounds
Export Smooth

All defined chromatograms belong to the Chromatograms collection represented by


the Chromatograms object. You can find a particular chromatogram by iterating
through this collection.

See Also
Chromatograms object

DataAnalysis Script Reference Manual, Version 3.3 2-7


Automation Objects Bruker Daltonik GmbH

2.6 ChromatogramDefinition Objects


The ChromatogramDefinition objects represent the description of a particular chro-
matogram trace.

There exist several different ChromatogramDefinition objects, each for a specific type
of chromatogram trace. These are:
TICChromatogramDefinition for Total Ion Chromatograms
EICChromatogramDefinition for Extracted Ion Chromatograms
BPCChromatogramDefinition for Base Peak Chromatograms
CNLChromatogramDefinition for Constant Neutral Loss Chromatograms
MassPosChromatogramDefinition for Mass Position Chromatograms
UVChromatogramDefinition for 1D UV Chromatograms
UV2DChromatogramDefinition for extracted chromatograms of a 2D UV data
file
VARChromatogramDefinition for Acquisition Parameter Chromatograms

Each of these ChromatogramDefinition objects has the following objects, properties


and methods:
Objects

Properties TIC… EIC... BPC... CNL... MassPos... UV... UV2... VAR...


Type X X X X X X X X
Name X X X X X X X X
MSFilter X X X X
ScanMode X X X
Polarity X X X X
BackgroundType X X X
Range X X X X X
WidthRight, WidthLeft X X X X
Filename X X
RetentionTimeOffset X X
VariableName X
GroupName X

2-8 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

Methods

ChromatogramDefiniton objects are used in two situations: First to define a new chro-
matogram and to add it to the analysis and second to get information about an existing
chromatogram.

Example
The following example first adds a single TIC and then a set of three traces, another
TIC, a BPC, and an acquisition variable trace to the list of loaded and displayed traces
in DataAnalysis:
Dim TIC, BPC, UV, Var
Dim Chroms(3) ' define an array of four chromatogram
definitions

' define a "TIC, +All MS FullScan" chromatogram trace


Set TIC =
CreateObject("[Link]")
[Link] = daMSFilterMS
[Link] = daScanModeFullScan
[Link] = daPositive
' load and display the "TIC, +All MS FullScan " chromatogram
trace
[Link] TIC

' alter the TIC definition to "TIC –MS2(390.4) FullScan" and


add it to the array of chromatogram definitions
[Link] = daMSFilterMSMS
[Link] = "390.4"
[Link] = daScanModeFullScan
[Link] = daNegative
Set Chroms(0) = TIC

' define a base peak chromatogram definition of "BPC 200-500;


700; 800-1000 +All MSn FullScan" with spectral background
subtracted and add it to the array of chromatogram definitions
Set BPC =
CreateObject("[Link]")

DataAnalysis Script Reference Manual, Version 3.3 2-9


Automation Objects Bruker Daltonik GmbH

[Link] = daMSFilterAllMSMS
[Link] = daScanModeFullScan
[Link] = daPositive
[Link] = daBgrdTypeSpectral
[Link] = "200-500; 700; 800-1000"
[Link] = 0.8
[Link] = 1.0
Set Chroms(1) = BPC

' define a UV chromatogram of a ChemStation UV file


Set UV = CreateObject("[Link]")
[Link] = "[Link]"
Set Chroms(2) = UV

' define an acquisition parameter chromatogram definition of


the "Vacuum High (Vacuum System)" variable and add it to the
array of chromatogram definitions
Set Var =
CreateObject("[Link]")
[Link] = "Vacuum High"
[Link] = "Vacuum System"
Set Chroms(3) = Var

' load and display the array of four chromatogram definitions


at once
[Link](Chroms)

2.7 Chromatograms Object


The Chromatograms object represents all chromatograms defined for an analysis.
The Chromatograms object is a collection of one or more Chromatogram objects.

The Chromatograms object has the following objects, properties and methods:
Objects

Properties
Count

2-10 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

Methods
Add FindsCompounds
AddChromatogram IntegrateOnly
AddChromatograms Item
BaselineSubtract Smooth
Clear
The Chromatograms object is a collection object that contains all Chromatogram
objects. To find a particular object, iterate through the collection by using the Chroma-
tograms object of the Analysis object. Consider the following code snippet from an
AutomationEngine Script:
Example
Dim DataAnalysis, myAnalysis, Chrom
Set DataAnalysis = GetObject("",
"[Link]")
Set myAnalysis = [Link] "C:\Data
Files\Demo\Sample.d\[Link]"
For Each Chrom in [Link]
' Access Chrom here.
' For example:
[Link]
Next

See Also
Chromatogram object

2.8 Compound Object


The Compound object represents a compound of an analysis. The Compound object
is a collection of one or more Spectrum objects.

The Compound object has the following objects, properties and methods:

Objects
LibrarySearchResult Variables

DataAnalysis Script Reference Manual, Version 3.3 2-11


Automation Objects Bruker Daltonik GmbH

Properties
Area MSFilter
BaselineEndIntensity Name
BaselineStartIntensity PeakEndIntensity
Chromatogram PeakStartIntensity
Count RetentionTime
HasLibrarySearchResults RetentionTimeEnd
Height RetentionTimeStart
Intensity SeparationType
Molweight SignalToNoise

Methods
Deconvolute Item
Export

All defined compounds belong to the Compounds collection represented by the Com-
pounds object. You can find a particular compound by iterating through this collection.
Example
In the following sample cmpd is the first compound and ms2 is the second spectrum of
this compound:
dim cmpd, ms2
set cmpd = [Link](0)
set ms2 = cmpd(2)
The following sample code exports every second spectrum of all compounds in BSC
format:
For i = 1 to [Link]
[Link](i)(2).Export CStr(i), daBSC
Next

See Also
Compounds object

2-12 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.9 Compounds Object


The Compounds object represents all compounds of a chromatographic analysis. The
Compounds object is a collection of one or more Compound objects.

The Compounds object has the following objects, properties and methods:

Objects

Properties
Count

Methods
Clear Identify
Deconvolute Item
DeleteCompound MassListClear
Export MassListFind

The Compounds object is a collection object that contains all Compound objects. To
find a particular object, iterate through the collection by using the Compounds object
of the Analysis object. Consider the following code snippet from a DataAnalysis Script:
Example
Dim Cmpd
For Each Cmpd in [Link]
' Access Cmpd here.
' For example:
[Link]
Next

See Also
Compound object

DataAnalysis Script Reference Manual, Version 3.3 2-13


Automation Objects Bruker Daltonik GmbH

2.10 Form Object


The Form object represents the VBScripting form in the AutomationEngine and in
DataAnalysis.
The Form object has the following objects, properties and methods:
Objects

Properties

Methods
Caption Maximize
Close Minimize
DoEvents Restore
Enable Show
Hide ShowMenu
HideMenu

2.11 GenerateFormulaParameters Object


The GenerateFormulaParameters object defines all parameters used for generating
sum formulas from a specified region of a mass spectrum.

The GenerateFormulaParameters object has the following objects, properties and


methods:
Objects

Properties
ApplyNitrogenRule HCRatioMinimum
AutoSearchMonoIsotopicPeak LowerBoundaryFormula
Charge NumberOfFormula
DoubleBondEquivalenceMaximum SearchMass
DoubleBondEquivalenceMinimum SearchRange
ElectronConfiguration Tolerance
HCRatioMaximum UpperBoundaryFormula

2-14 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

Methods

Example
Dim GFP
Set GFP =
CreateObject("[Link]")

[Link] = +1
[Link] = 3
[Link] = 8
[Link] = "C5H5Fe0"
[Link] = "C30H30Fe3"
[Link] = 50
[Link] = 0.001
[Link] = 186
[Link] = 0.5

See Also
GenerateFormula method

2.12 LibrarySearchResult Object

The LibrarySearchResult object contains the library search result of a compound or


mass spectrum for a chromatogram analysis, resp. spectrum analysis.

The LibrarySearchResult object has the following objects, properties and methods:

Objects

Properties
CASRegistryNumber HasIdentifiedPositivePolarity
CompoundComment LibraryNames
CompoundName MolWeight
Fit Purity
Formula RetentionTime

DataAnalysis Script Reference Manual, Version 3.3 2-15


Automation Objects Bruker Daltonik GmbH

HasIdentifiedMS RFit
HasIdentifiedMSMS SpectrumComment
HasIdentifiedNegativePolarity SpectrumInfo

Methods

See Also
LibrarySearchResults object

2.13 LibrarySearchResults Object


The LibrarySearchResults object represents all library search results of a compound
or spectrum from a chromatogram analysis, resp. spectrum analysis. The Library-
SearchResults object is a collection of one or more LibrarySearchResult objects.

The LibrarySearchResults object has the following objects, properties and methods:

Objects

Properties
Count

Methods
Item

The LibrarySearchResults object is a collection object that contains all Library-


SearchResult objects. To find a particular object, iterate through the collection by
using the LibrarySearchResults object of a Compound, resp. Spectrum object.

Example
The following example displays a message box with the library search result for the first
compound:
dim Results
set Results = [Link](1).LibrarySearchResults

dim i

2-16 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

dim output
for i = 1 to [Link]
output = output + vbLf + " " + Results(i).CompoundName +
", Purity = " + CStr(Results(i).Purity)
next

if [Link] > 0 then


MsgBox "Compound 1 has been identified as:" + output
else
MsgBox "Compound 1 has not been identified."
end if

See Also
LibrarySearchResult object

2.14 MSFilter Object


The MSFilter object defines mass spectrum specific information of a Chromatogram-
Definition object.

The MSFilter object has the following objects, properties and methods:
Objects

Properties
FragmentationPath
Type

Methods

Example
Dim TIC
Set TIC =
CreateObject("[Link]")

[Link] = daMSFilterMSMS
[Link] = "490.8/300.5"

DataAnalysis Script Reference Manual, Version 3.3 2-17


Automation Objects Bruker Daltonik GmbH

[Link] TIC

See Also
ChromatogramDefinition objects

2.15 MSPeak Object


The MSPeak object represents a peak of a mass spectrum.
Note: The GUI elements to which the MSPeak object corresponds are named as
‘Mass List’ and ‘MassList menu’.

The MSPeak object has the following objects, properties and methods:

Objects

Properties
Algorithm PeakEnd
Area PeakEndIntensity
ChargeState PeakStart
DeconvolutedMolweight PeakStartIntensity
DeconvolutionComponent SignalToNoise
Intensity Width
m_over_z

Methods

See Also
MSPeakList object

2-18 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.16 MSPeakList Object


The MSPeakList object represents all peaks of a mass spectrum. The MSPeakList
object is a collection of one or more MSPeak objects.
Note: The GUI elements to which the MSPeakList object corresponds are named as
‘Mass List’, and ‘MassList menu’.

The MSPeakList object has the following objects, properties and methods:

Objects

Properties
Count

Methods
DeletePeak

The MSPeakList object is a collection object that contains all MSPeak objects of a
mass spectrum. To find a particular object, iterate through the collection by using the
MSPeakList object of the Spectrum object. Consider the following code snippet from a
DataAnalysis Script:
Example
Dim Peak
For Each Peak in [Link]
' Access Peak here.
' For example:
MsgBox Peak.m_over_z
Next

See Also
MSPeak object
Spectrum object

DataAnalysis Script Reference Manual, Version 3.3 2-19


Automation Objects Bruker Daltonik GmbH

2.17 Properties Object


The Properties object represents an open analysis.

The Properties object has the following objects, properties and methods:

Objects

Properties
Comment InstrumentName
DateCreated SampleInfo

Methods

Example
The following example displays a message box with analysis properties:
Dim Properties
Dim CR
CR = chr(13)
Properties = "Analysis name: " + [Link] + CR
Properties = Properties + " Comment: " +
[Link] + CR
Properties = Properties + " Date created: " +
[Link] + CR
Properties = Properties + " Instrument name: " +
[Link] + CR
Properties = Properties + " Sample info: " +
[Link] + CR
MsgBox Properties

2-20 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.18 Spectra Object


The Spectra object represents all spectra in a spectrum analysis. The Spectra object
is a collection of one or more Spectrum objects.

The Spectra object has the following objects, properties and methods:

Objects

Properties
Count

Methods
BaselineSubtract Item
Deconvolute MassListClear
Export MassListFind
GenerateFormula Smooth
Identify

The Spectra object is a collection object that contains all Spectrum objects. To find a
particular object, iterate through the collection by using the Spectra object of the Ana-
lysis object.

See Also
Spectrum object

2.19 Spectrum Object


The Spectrum object represents a mass spectrum of a spectrum analysis or a com-
pound of a chromatogram analysis.
The Spectrum object has the following objects, properties and methods:
Objects
LibrarySearchResult Variables
MSPeakList

DataAnalysis Script Reference Manual, Version 3.3 2-21


Automation Objects Bruker Daltonik GmbH

Properties
BackgroundType MinimumIntensity
FirstMass MSFilter
HasLibrarySearchResults MSPeakList
Intensity Name
LastMass Polarity
Mass ScanMode
MaximumIntensity Size

Methods
Export MassListFind
ExportMassList RecalibrateInternal
GenerateFormula Smooth
Identify SpectrumData
MassListClear

For a spectrum analysis all defined spectra belong to the Spectra collection repre-
sented by the Spectra object. For a chromatogram analysis all defined spectra belong
to the Compound collection represented by the Compound object; the Compound
object is in turn a collection of the Compounds object. You can find a particular spec-
trum by iterating through this collection.

See Also
Spectra object
Compound object

2-22 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.20 SumFormula Object


The SumFormula object represents a sum formula of a chemical compound.
The SumFormula object has the following objects, properties and methods:

Objects

Properties
AverageMass MonoIsotopicMass
ElementalCounts NominalMass
Formula

Methods
Add Pattern
ElementalComposition Subtract

Example
The following example calculates and displays the average mass of the singly charged
ion of Ethanol (C2H5OH) and also displays the hill-sorted sum formula of Ethanol:
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
MsgBox [Link](+1)
MsgBox [Link]

DataAnalysis Script Reference Manual, Version 3.3 2-23


Automation Objects Bruker Daltonik GmbH

2.21 Variable Object


The Variable object represents a variable item of the Variables object.
The Variable object has the following objects, properties and methods:

Objects

Properties
Group Unit
Name Value

Methods

Example
The following example displays the accumulation time of the first spectrum of
compound 1 for an esquire analysis:
dim i, var, Variables
set Variables = [Link](1)(1).Variables

for i = 1 to [Link]
set var = Variables(i)
if [Link] = "Trap" and [Link] = "Accumulation Time"
then
MsgBox "The accumulation time is "+[Link]+"
"+[Link]
exit for
end if
next

See Also
Variables object

2-24 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Objects

2.22 Variables Object


The Variables object is a collection class of Variable items and represents variables of
a Spectrum object.
The Variables object has the following objects, properties and methods:

Objects

Properties
Count

Methods
Item

Example
The following example displays the number of variables of the first spectrum of com-
pound 1:
dim Cmpd, nVars
set Cmpd = [Link](1)
nVars = Cmpd(1).[Link]
msgbox "The first spectrum of compound """+[Link]+"""
contains "+CStr(nVars)+" variables."

See Also
Spectrum object
Variable object

DataAnalysis Script Reference Manual, Version 3.3 2-25


Automation Objects Bruker Daltonik GmbH

2-26 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3 AUTOMATION PROPERTIES
Properties are characteristics of objects. For example, analysis objects have Name and
Path properties. These properties correspond to the name and path of an analysis. For
examples of using properties, see the macro samples provided with DataAnalysis.

The following properties are available:


Property Description
Active Gets or sets whether DataAnalysis is active.
ActiveAnalysis Gets the Analysis object representing the active
analysis.
Algorithm Gets the algorithm which was used for finding the
peak of an MSPeak object.
ApplyNitrogenRule Gets or sets the state of applying nitrogen rule of
a GenerateFormulaParameters object.
Area Gets the area of the peak of a Compound or
MSPeak object.
AutoSearchMonoIsotopicPeak Gets or sets the “auto-search mono-isotopic
peak” option of a GenerateFormulaParameters
object.
AverageMass Gets the average mass of the SumFormula
object.
BackgroundType Gets or sets the background subtraction type of
an MS type ChromatogramDefinition object or
Spectrum object.
BaselineEndIntensity Gets the intensity of the baseline at the end of a
Compound object.
BaselineStartIntensity Gets the intensity of the baseline at the start of a
Compound object.
CASRegistraNumber Gets the Chemical Abstracts Registry Number of
a LibrarySearchResult object.
Charge Gets or sets the charge of a
GenerateFormulaParameters object.
ChargeState Gets the charge state of an MSPeak object.
Chromatogram Gets the chromatogram from which the
chromatographic peak of the Compound object
was derived.

DataAnalysis Script Reference Manual, Version 3.3 3-1


Automation Properties Bruker Daltonik GmbH

Comment Gets the comment of an analysis (Properties


object).
CompoundComment Gets the compound comment text of a
LibrarySearchResult object.
CompoundName Gets the compound name of a LibrarySearch-
Result object.
Count Gets the number of items in a collection.
DateCreated Gets the Date an analysis was created
(Properties object).
DeconvolutedMolweight Gets the deconvoluted molweight of an MSPeak
object.
DeconvolutionComponent Gets the deconvolution component related to an
MSPeak object.
Definition Gets a ChromatogramDefinition object.
DoubleBondEquivalenceMaximum Gets or sets the double bond equivalence
maximum of a GenerateFormulaParameters
object.
DoubleBondEquivalenceMinimum Gets or sets the double bond equivalence mini-
mum of a GenerateFormulaParameters object.
ElectronConfiguration Gets or sets the electron configuration of a
GenerateFormulaParameters object.
ElementalCounts Gets the total number of different elements of a
sum formula. It also retrieves the number of
occurrences of each element from the formula of
a SumFormula object.
Filename Gets or sets the filename of a Chromatogram-
Definition object.
FirstMass Gets the first mass of a Spectrum object.
FirstRetentionTime Gets the first retention time value of a Chroma-
togram object in seconds.
Fit Gets the effective Fit score of a LibrarySearch-
Result object.
Formula Gets or sets the chemical formula of a SumFor-
mula object. Gets the chemical formula of a
LibrarySearchResult object.
FragmentationPath Gets or sets the fragmentation path of a
ChromatogramDefinition object.
FullName Gets the full path of an Analysis or Application
bj t

3-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

object.
Group Gets the group string value of a Variable object.
GroupName Gets or sets the group name of a Chromato-
gramDefinition object.
HasIdentifiedMS Gets the condition of a LibrarySearchResult
object if the compound has been identified by its
precursor spectra.
HasIdentifiedMSMS Gets the condition of a LibrarySearchResult
object if the compound has been identified by its
fragment spectra.
HasIdentifiedNegativePolarity Gets the condition of a LibrarySearchResult
object if the compound has been identified by
negative polarity spectra.
HasIdentifiedPositivePolarity Gets the condition of a LibrarySearchResult
object if the compound has been identified by
positive polarity spectra.
HasLibrarySearchResults Gets the condition of a Compound or Spectrum
object if has been identified.
IsChromatographicAnalysis Gets the condition of an Analysis object if the
analysis is a chromatogram analysis.
LastMass Gets the last mass of a Spectrum object.
LastRetentionTime Gets the last retention time value of a Chroma-
togram object in seconds.
LibraryNames Gets the names of the mass-spectral library of a
LibrarySearchResult object.
Logging Turns on/off logging of all incoming automation
calls.
LowerBoundaryFormula Gets or sets the lower boundary formula of sum
formulas to be generated of a GenerateFormu-
laParameters object.
m_over_z Gets the m/z value of an MSPeak object.
Mass Gets the m/z value at defined index of a Spec-
trum object.
MaximumIntensity Gets the maximum intensity of a Chromatogram
or Spectrum object.
MinimumIntensity Gets the minimum intensity of a Chromatogram
or Spectrum object.

DataAnalysis Script Reference Manual, Version 3.3 3-3


Automation Properties Bruker Daltonik GmbH

MolWeight Gets the deconvoluted m/z value of the precursor


that was used for creating the compound of a
Compound object (AutoMSn algorithm). Gets
the molecular weight of a LibrarySearchResult
object.
MonoIsotopicMass Gets the nominal m/z value of the SumFormula
object at a specific charge state.
MSFilter Gets the MS/MS Info of the spectrum/spectra
related to a Compound or Spectrum object.
MSPeakList Gets the Mass List (MS peak list) of a Spectrum
object.
Name Gets the name of an Analysis, Application,
Chromatogram, ChromatogramDefinition,
Compound, Spectrum or Variable object.
NominalMass Gets the nominal m/z value of the SumFormula
object at a specific charge state.
NumberOfFormula Gets or sets the maximum number of formulas to
be generated of a GenerateFormulaParameters
object.
Path Gets the path to an object. This path never ends
with a backslash, unless the path has the format
"C:\."
PeakEnd Gets the m/z value at the end of an MSPeak
object.
PeakEndIntensity Gets the intensity at the end of a Compound or
MSPeak object.
PeakStart Gets the m/z value at the start of an MSPeak
object.
PeakStartIntensity Gets the intensity at the start of a Compound or
MSPeak object.
Polarity Gets or sets the polarity of an MS type Chroma-
togramDefinition object or Spectrum object.
Purity Gets the effective Purity score of a Library-
SearchResult object.
Range Gets or sets the range of a ChromatogramDefi-
nition object.
RetentionTime Gets the retention time value at defined index of
a Chromatogram [Link] the retention time
of a Compound object. Gets the retention time

3-4 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

of a LibrarySearchResult object.
RetentionTimeEnd Gets the retention time at which the Compound
object ends.
RetentionTimeOffset Gets or sets the retention time offset of a UV
type ChromatogramDefinition object.
RetentionTimeStart Gets the retention time at which the Compound
object starts.
RFit Gets the effective RFit score of a
LibrarySearchResult object.
ScanMode Gets or sets the scan mode of an MS type
ChromatogramDefinition object or Spectrum
object.
ScriptVariable Gets and sets a string value to a variable of an
Analysis object.
SearchMass Gets or sets the search mass of a Generate-
FormulaParameters object to be looked for in a
mass spectrum.
SearchRange Gets or sets the range of a GenerateFormula-
Parameters object within the search mass
should be searched in a mass spectrum.
SeparationType Gets the type of separation of a Compound
object.
SequenceNumbers Gets the sequence numbers which contributed to
a Spectrum object.
SignalToNoise Gets the signal to noise ratio of a Compound or
MSPeak object.
Size Gets the number of data points of a Spectrum
object.
SpectrumComment Gets the spectrum comment text of a Library-
SearchResult object.
SpectrumInfo Gets the spectrum information text of a Library-
SearchResult object.
Type Gets the type of a ChromatogramDefinition
object.
Unit Gets the unit string value of a Variable object.
UpperBoundaryFormula Gets or sets the upper boundary formula of sum
formulas to be generated of a GenerateFormu-
laParameters object.

DataAnalysis Script Reference Manual, Version 3.3 3-5


Automation Properties Bruker Daltonik GmbH

Value Gets the string value of a Variable object.


VariableName Gets or sets the variable name of a Chromato-
gramDefinition object.
Version Gets the version of DataAnalysis.
Visible Gets the condition of an Application object if the
application is visible.
Width Gets the peak width of an MSPeak object.
WidthLeft Gets or sets the tolerance to the left of a
ChromatogramDefinition object.
WidthRight Gets or sets the tolerance to the right of a
ChromatogramDefinition object.

3.1 Active Property


Applies to: Application object
Gets or sets whether DataAnalysis is active.

Syntax
[Link] [=boolean]
Parameters
object An expression that evaluates to an Application object. When you access
the Active property of the Application object, you can omit object
because the name of the Application object is implied when you access
its properties and methods.
boolean A Boolean that sets the state of the object. Possible values are:
True Activates the object.
False Deactivates the object.
Return Values
The Active property returns one of the following values:
• True The object is active.
• False The object is not active.
Remarks
The Active property has the Boolean type.

3-6 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Example
The following example browses all open analyses for the analysis named MyAnalysis.
If the analysis is found, it becomes the active analysis.
Dim myAnalysis
set Application = GetObject("",
"[Link]")
For Each myAnalysis in [Link]
If [Link] = "MyAnalysis" Then
[Link] = True
End If
Next

3.2 ActiveAnalysis Property


Applies to: Analyses object
Retrieves the active analysis from an Analyses collection.
Syntax
[Link]
Parameters
object An expression that evaluates to an Analyses object.
Example
The following example retrieves the active analysis from Analyses collection:
[Link]

3.3 Algorithm Property


Applies to: MSPeak object
Gets the algorithm which was used for finding the peak of an MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

DataAnalysis Script Reference Manual, Version 3.3 3-7


Automation Properties Bruker Daltonik GmbH

3.4 ApplyNitrogenRule Property


Applies to: GenerateFormulaParameters object
Gets or sets the state of applying nitrogen rule of a GenerateFormulaParameters
object.
Syntax
[Link]
Parameters
object An expression that evaluates to an GenerateFormulaParameters object.
boolean A Boolean that sets whether the nitrogen rule should be applied or not.
Possible values are:
True Applies the rule.
False Deactivates the rule.

3.5 Area Property


Applies to: Compound object, MSPeak object
Gets the area of the chromatographic peak of a Compound object or the mass peak of
an MSPeak object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

3-8 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.6 AutoSearchMonoIsotopicPeak Property


Applies to: GenerateFormulaParameters object
Gets or sets the “auto-search mono-isotopic peak” option of a GenerateFormulaPara-
meters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets/gets the auto-search mono-isotopic peak option of a
GenerateFormulaParameters object and displays it in a message box.
Dim GFP
Set GFP = CreateObject("[Link]")

[Link] = true
MsgBox [Link]

3.7 AverageMass Property


Applies to: SumFormula object
Gets the average mass of a SumFormula object.

Syntax
[Link] charge
Parameters
object An expression that evaluates to a SumFormula object.
charge Charge state for which the m/z value should be calculated.
Example
The following example calculates and displays the average mass of Ethanol (C2H5OH):
dim SF
set SF = CreateObject("[Link]")

DataAnalysis Script Reference Manual, Version 3.3 3-9


Automation Properties Bruker Daltonik GmbH

[Link] = "C2H5OH"
MsgBox [Link](0)

3.8 BackgroundType Property


Applies to: MS type ChromatogramDefinition objects (TICChromatogramDefini-
tion object, BPCChromatogramDefinition object, EICChromatogram-
Definition object), Spectrum object
Gets or sets the background subtraction type of an MS type ChromatogramDefinition
or Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies
To list above.
BackgroundType = daBgrdTypeNone no background subtraction
daBgrdTypeConstant background subtraction of a constant,
previously defined Background Mass
Spectrum
daBgrdTypeSpectral two dimensional, spectral background
subtraction
Example
The following example sets the background type of TICChromatogramDefinition:
[Link] = daBgrdTypeSpectral

3.9 BaselineEndIntensity Property


Applies to: Compound object
Gets the intensity of the baseline at the end of a Compound object.
Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

3-10 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.10 BaselineStartIntensity Property


Applies to: Compound object
Gets the intensity of the baseline at the start of a Compound object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

3.11 CASRegistryNumber Property


Applies to: LibrarySearchResult object
Gets the Chemical Abstracts Registry Number of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.12 Charge Property


Applies to: GenerateFormulaParameters object
Gets or sets the charge of a GenerateFormulaParameters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.

DataAnalysis Script Reference Manual, Version 3.3 3-11


Automation Properties Bruker Daltonik GmbH

Example
The following example sets/gets the charge of a GenerateFormulaParameters object
and displays it in a message box.
Dim GFP
Set GFP = CreateObject("[Link]")

[Link] = -5
MsgBox [Link]

3.13 ChargeState Property


Applies to: MSPeak object
Gets the charge state of an MSPeak object.

Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

3.14 Chromatogram Property


Applies to: Compound object
Gets the chromatogram from which the chromatographic peak of the Compound
object was derived.

Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

3-12 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.15 Comment Property


Applies to: Properties object
Gets the analysis comment of a Properties object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Properties object.
Example
MsgBox [Link]

3.16 CompoundComment Property


Applies to: LibrarySearchResult object
Gets the compound comment text of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.17 CompoundName Property


Applies to: LibrarySearchResult object
Gets the compound name of a LibrarySearchResult object.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-13


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.18 Count Property


Applies to: Analyses object, Chromatograms object, Compounds object, Library-
SearchResults object, MSPeakList object, Spectra object, Variables
object
Gets the number of items in a collection.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Remarks
The Count property has the Long type.
Use the Count property, for example, to get the number of analyses in the Analyses
collection.
Example
The following example prints each analysis in the Analyses collection:
For i = 1 to [Link]
[Link](i).Print("Chromatogram
[Link]")
Next

3-14 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.19 DateCreated Property


Applies to: Properties object
Gets the date an analysis was created.

Syntax
[Link]
Parameters
object An expression that evaluates to a Properties object.
Example
MsgBox [Link]

3.20 DeconvolutedMolweight Property


Applies to: MSPeak object
Gets the deconvoluted molweight of an MSPeak object.

Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

3.21 DeconvolutionComponent Property


Applies to: MSPeak object
Gets the deconvolution component related to an MSPeak object.

Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

DataAnalysis Script Reference Manual, Version 3.3 3-15


Automation Properties Bruker Daltonik GmbH

3.22 Definition Property


Applies to: Chromatogram object
Gets the definition of a Chromatogram object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Chromatogram object.
Example
The following example gets the definition and displays the name of each chromato-
gram:
Dim Definition
For each Chromatogram in [Link]
MsgBox [Link]
If [Link] = daTICChromType Then
MsgBox "This is a TIC"
End If
next

3.23 DoubleBondEquivalenceMaximum Property


Applies to: GenerateFormulaParameters object
Gets or sets the double bond equivalence maximum of a GenerateFormulaParame-
ters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
Dim GFP
Set GFP = CreateObject("[Link]")

3-16 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

[Link] = 13
MsgBox [Link]

3.24 DoubleBondEquivalenceMinimum Property


Applies to: GenerateFormulaParameters object
Gets or sets the double bond equivalence minimum of a GenerateFormulaPara-
meters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
Dim GFP
Set GFP = CreateObject("[Link]")

[Link] = 4
MsgBox [Link]

3.25 ElectronConfiguration Property


Applies to: GenerateFormulaParameters object
Gets or sets the electron configuration of a GenerateFormulaParameters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaPara-
meters object.
ElectronConfiguration = daEven even number of electrons
daOdd odd number of electrons
daEvenOdd either even or odd number of electrons

DataAnalysis Script Reference Manual, Version 3.3 3-17


Automation Properties Bruker Daltonik GmbH

3.26 ElementalCounts Property


Applies to: SumFormula object
Gets the total number of different elements of a sum formula. It also retrieves the
number of occurrences of each element from the formula of a SumFormula object.

Syntax
[Link] symbols counts
Parameters
object An expression that evaluates to a SumFormula object.
symbols An array storing the symbols of each different element.
counts An array storing the number of occurrences of each different element.
Example
The following example gets the number of different elements and retrieves the number
of occurrences of each element.
Note: Arrays starting with index zero.
dim symbols()
dim counts()

dim SF
set SF = CreateObject("[Link]")

[Link] = "C10H10Fe"
MsgBox [Link] symbols, counts

'how many different symbols are available


MsgBox UBound(symbols) + 1

for n = 0 to UBound(symbols)
MsgBox symbols(n) & " " & counts(n)
next

3-18 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.27 Filename Property


Applies to: UVChromatogramDefinition object, UV2DChromatogramDefinition
object
Gets or sets the filename of an UV data file of an UVChromatogramDefinition object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
filename Filename of UV data file without path information. The UV data file must
be located in the same folder as the mass spectral data file, e.g.,
"[Link]".
Remarks
If a UV chromatogram acquired by HyStar is set, the *.unt file name must be appended
with a string ": (n)", where ‘n’ denotes the ordinal of the UV chromatogram to set. See
example below.
Examples
The following example sets the UV data filename:
[Link] = "[Link]"

The following example adds a chromatogram acquired by HyStar to the Chromato-


grams collection:
dim UV
set UV = CreateObject("[Link]")

' add the first of the UV traces stored by HyStar


[Link] = HyStarUNTFileName + ": (1)"
[Link] = 0

[Link] UV

function HyStarUNTFileName
n = InStrRev([Link], ".")
HyStarUNTFileName = Left([Link], n-1) + ".unt"
end function

DataAnalysis Script Reference Manual, Version 3.3 3-19


Automation Properties Bruker Daltonik GmbH

3.28 FirstMass Property


Applies to: Spectrum object
Gets the first mass of a Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Spectrum object.

3.29 FirstRetentionTime Property


Applies to: Chromatogram object
Gets the first retention time value of a Chromatogram object in seconds.

Syntax
[Link]
Parameters
object An expression that evaluates to a Chromatogram object.
Example
The following example displays the retention time range of the first chromatogram
loaded:
set chrom = [Link](1)
msgbox "Retention time: " +
CStr(Int([Link])) + " - " +
CStr(Int([Link]))
See Also
LastRetentionTime property

3-20 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.30 Fit Property


Applies to: LibrarySearchResult object
Gets the effective Fit score of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.31 Formula Property


Applies to: LibrarySearchResult object, SumFormula object
Gets the chemical formula of a LibrarySearchResult object.
Gets or sets the chemical formula of a SumFormula object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example displays the hill-sorted sum formula of Ethanol (C2H5OH):
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
MsgBox [Link]

See Also
LibrarySearchResults object

DataAnalysis Script Reference Manual, Version 3.3 3-21


Automation Properties Bruker Daltonik GmbH

3.32 FragmentationPath Property


Applies to: MSFilter object
Gets or sets the fragmentation path of an MSFilter object.
Syntax
[Link]
Parameters
object An expression that evaluates to an MSFilter object.
Remarks
The FragmentationPath property has the String type.
Example
The following example gets the fragmentation path of a chromatogram definition object
and displays it in a message box:
MsgBox [Link]

3.33 FullName Property


Applies to: Analysis object, Application object
Gets the full path of an Analysis or Application object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above. When you access the FullName property of the Application
object, you can omit object because the name of the Application object is
implied when you access its properties and methods.
Remarks
The FullName property has the String type.
The following table summarizes the results of using the FullName property with the
objects in the Applies To list:

3-22 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Object Results
Application Gets the full path to the DataAnalysis executable, for example:
"C:\Program Files\DataAnalysis\[Link]"
Analysis Gets the full path to the file containing the analysis, for example:
"C:\Data Files\Demo\Sample.d\[Link]"
Example
The following example displays the full path to each analysis in the Analyses collec-
tion:
set Application = GetObject("",
"[Link]")
dim myAnalyses
set myAnalyses = [Link]
For i = 1 to [Link]
MsgBox [Link](i).FullName
Next

See Also
Name property
Path property

3.34 Group Property


Applies to: Variable object
Gets the group string value of a Variable object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Variable object.

See Also
Variable object
Variables object

DataAnalysis Script Reference Manual, Version 3.3 3-23


Automation Properties Bruker Daltonik GmbH

3.35 GroupName Property


Applies to: VarChromatogramDefinition object
Gets or sets the group name of a VarChromatogramDefinition object.

Syntax
[Link]
Parameters
object An expression that evaluates to a VarChromatogramDefinition object.
GroupName Name of group, to which an acquisition parameter belongs, as shown in
Edit Chromatograms dialog.
Example
The following example displays the variable name:
MsgBox [Link]

See Also
VariableName property

3.36 HasIdentifiedMS Property


Applies to: LibrarySearchResult object
Gets the condition of a LibrarySearchResult object if the compound has been
identified by its precursor spectra.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.

See Also
LibrarySearchResults object

3-24 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.37 HasIdentifiedMSMS Property


Applies to: LibrarySearchResult object
Gets the condition of a LibrarySearchResult object if the compound has been
identified by its fragment spectra.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.

See Also
LibrarySearchResults object

3.38 HasIdentifiedNegativePolarity Property


Applies to: LibrarySearchResult object
Gets the condition of a LibrarySearchResult object if the compound has been
identified by negative polarity spectra.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.

See Also
LibrarySearchResults object

DataAnalysis Script Reference Manual, Version 3.3 3-25


Automation Properties Bruker Daltonik GmbH

3.39 HasIdentifiedPositivePolarity Property


Applies to: LibrarySearchResult object
Gets the condition of a LibrarySearchResult object if the compound has been identi-
fied by positive polarity spectra.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.

See Also
LibrarySearchResults object

3.40 HasLibrarySearchResults Property


Applies to: Compound object, Spectrum object
Gets the condition of a Compound or Spectrum object if has been identified.

Syntax
[Link]
Parameters
object An expression that evaluates to a Compound or Spectrum object.

See Also
LibrarySearchResults object

3-26 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.41 HCRatioMaximum Property


Applies to: GenerateFormulaParameters object
Gets or sets the maximum H/C ratio of a GenerateFormulaParameters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.

3.42 HCRatioMinimum Property


Applies to: GenerateFormulaParameters object
Gets or sets the minimum H/C ratio of a GenerateFormulaParameters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.

3.43 Height Property


Applies to: Compound object
Gets the height of a Compound object.
Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

DataAnalysis Script Reference Manual, Version 3.3 3-27


Automation Properties Bruker Daltonik GmbH

3.44 InstrumentName Property


Applies to: Properties object
Gets the instrument name of the instrument the analysis was acquired on.
Syntax
[Link]
Parameters
object An expression that evaluates to a Properties object.
Example
MsgBox [Link]

3.45 Intensity Property


Applies to: Chromatogram object, Compound object, MSPeak object, Spectrum
object
Gets the intensity value at defined index of a Chromatogram, Compound, MSPeak or
Spectrum object.

Syntax
[Link](n)
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
n An index value for the intensity to retrieve; applies only to the Chromato-
gram, Compound and Spectrum, but not to the MSPeak object.
Remarks
When accessing numerous intensity values of a chromatogram or spectrum, the Chro-
matogramData method, resp. SpectrumData method, will be significantly faster.
Example
The following example finds and displays the maximum intensity of the first chroma-
togram.
dim chrom
set chrom = [Link](1)

3-28 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

dim i, MaxIntensity
MaxIntensity = 0
for i = 1 to [Link]
if MaxIntensity < [Link](i) then
MaxIntensity = [Link](i)
end if
next

MsgBox "The maximum intensity in the chromatogram is " +


CStr(MaxIntensity) + "."

See Also
ChromatogramData method
SpectrumData method
Mass property
RetentionTime property

3.46 IsChromatographicAnalysis Property


Applies to: Analysis object
Gets the condition of an Analysis object if the analysis is a chromatogram analysis.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.

3.47 LastMass Property


Applies to: Spectrum object
Gets the last mass of a Spectrum object.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-29


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a Spectrum object.

3.48 LastRetentionTime Property


Applies to: Chromatogram object
Gets the last retention time value of a Chromatogram object in seconds.

Syntax
[Link]
Parameters
object An expression that evaluates to a Chromatogram object.
Example
The following example displays the retention time range of the first chromatogram
loaded:
set chrom = [Link](1)
msgbox "Retention time: " +
CStr(Int([Link])) + " - " +
CStr(Int([Link]))

See Also
FirstRetentionTime property

3.49 LibraryNames Property


Applies to: LibrarySearchResult object
Gets the names of the mass-spectral library of a LibrarySearchResult object.
Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3-30 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.50 Logging Property


Applies to: Application object
Turns on/off logging of all incoming automation calls.

Syntax
[Link] [=boolean]
Parameters
object An expression that evaluates to an Application object.
boolean A Boolean that sets the state of the object. Possible values are:
True Activates the object.
False Deactivates the object.
Return Values
The Logging property returns one of the following values:
• True The object is active.
• False The object is not active.
Remarks
The Logging property has the Boolean type.
Example
The following example first displays a message box with the current logging status and
then turns on logging.
MsgBox([Link])
[Link] = true

3.51 LowerBoundaryFormula Property


Applies to: GenerateFormulaParameters object
Gets or sets the lower boundary formula of sum formulas to be generated of a
GenerateFormulaParameters object.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-31


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets/gets the lower boundary formula of a GenerateFormula-
Parameters object and displays it in a message box:
Dim GFP
Set GFP = CreateObject("[Link]")

[Link] = "C24H30N0O2S3"
MsgBox [Link]

3.52 m_over_z Property


Applies to: MSPeak object
Gets the m/z value of an MSPeak object.

Syntax
object.m_over_z
Parameters
object An expression that evaluates to an MSPeak object.

3.53 Mass Property


Applies to: Spectrum object
Gets the m/z value at defined index of a Spectrum object.

Syntax
[Link](n)
Parameters
object An expression that evaluates to a Spectrum object.
n Index value for the m/z value to retrieve.
Remarks
When accessing numerous mass values of a spectrum, the SpectrumData method will
be significantly faster.

3-32 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Example
The following example finds and displays the most intense m/z value of the first
spectrum in the first compound.
dim spec
set spec = [Link](1)(1)

dim i, MaxIntensity, MaxMass


MaxIntensity = 0
MaxMass = 0

for i = 1 to [Link]
if MaxIntensity < [Link](i) then
MaxIntensity = [Link](i)
MaxMass = [Link](i)
end if
next

MsgBox "The most intense is at m/z " + FormatNumber(MaxMass,


2) + "." + "."

See Also
SpectrumData method
Intensity property

3.54 MaximumIntensity Property


Applies to: Chromatogram object, Spectrum object
Gets the maximum intensity of a Chromatogram or Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

DataAnalysis Script Reference Manual, Version 3.3 3-33


Automation Properties Bruker Daltonik GmbH

3.55 MinimumIntensity Property


Applies to: Chromatogram object, Spectrum object
Gets the minimum intensity of a Chromatogram or Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

3.56 MolWeight Property


Applies to: Compound object, LibrarySearchResult object
Gets the deconvoluted m/z value of the precursor that was used for creating the
compound of a Compound object (AutoMSn algorithm).
Gets the molecular weight of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
See Also
LibrarySearchResults object

3.57 MonoIsotopicMass Property


Applies to: SumFormula object
Gets the nominal m/z value of a SumFormula object at a specific charge state.
Syntax
[Link] charge

3-34 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Parameters
object An expression that evaluates to a SumFormula object.
charge Charge state for which the m/z value should be calculated.
Example
The following example calculates and displays the monoisotopic mass of the double
charged ion of Ethanol (C2H5OH):
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
MsgBox [Link](+2)

3.58 MSFilter Property


Applies to: Compound object, Spectrum object
Gets the MS/MS Info of the spectrum/spectra related to a Compound or Spectrum
object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example displays a message box with the precursor of the 2nd spectrum
of the first compound:
Dim Cmpd
Dim Spec
set Cmpd = [Link](1)
set Spec = Cmpd(2)
msgbox "Precursor: " + [Link]

DataAnalysis Script Reference Manual, Version 3.3 3-35


Automation Properties Bruker Daltonik GmbH

3.59 MSPeakList Property


Applies to: Spectrum object
Gets the Mass List (MS peak list) of a Spectrum object.
Syntax
[Link]
Parameters
object An expression that evaluates to a Spectrum object.

3.60 Name Property


Applies to: Analysis object, Application object, Chromatogram object, all Chro-
matogramDefinition objects, Compound object, Spectrum object,
Variable object
Gets the name of an object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Remarks
The Name property has the String type.
The following table summarizes the results of using the Name property with the objects
in the Applies To list:
Object Results
Analysis Gets the name of the analysis.
Application Gets the name of the application.
Chromatogram Gets the description for the chromatogram.
Compound Gets the description for the processed mass spectrum.
Spectrum Gets the description for the mass spectrum.
ChromatogramDefinition Gets the name of chromatogram trace

3-36 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

The Name property does not get an analysis’ drive and directory. To get the drive and
directory use the Path or FullName property.
Example
The following example gets the name of the analysis and displays it in a message box:
MsgBox [Link]

See Also
FullName property
Variable object
Variables object

3.61 NominalMass Property


Applies to: SumFormula object
Gets the nominal m/z value of a SumFormula object at a specific charge state.

Syntax
[Link] charge
Parameters
object An expression that evaluates to a SumFormula object.
charge Charge state for which the m/z value should be calculated.
Example
The following example calculates and displays the nominal mass of Ethanol (C2H5OH):
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
MsgBox [Link](0)

DataAnalysis Script Reference Manual, Version 3.3 3-37


Automation Properties Bruker Daltonik GmbH

3.62 NumberOfFormula Property


Applies to: GenerateFormulaParameters object
Gets or sets the maximum number of formulas to be generated of a GenerateFormu-
laParameters object.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets/gets the number of formulas of a GenerateFormulaPara-
meters object and displays it in a message box:
[Link] = 42
MsgBox [Link]

3.63 Path Property


Applies to: Analysis object, Application object
Gets the path to an object. This path never ends with a backslash, unless the path has
the format "C:\."

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above. When you access the Path property of the Application object, you
can omit object because the name of the Application object is implied
when you access its properties and methods.
Remarks
The Path property has the String type.
The Path property does not get an object's file name and extension. To get the file
name and extension use the Name or FullName property.

3-38 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

The following table summarizes the results of using the Path property with the objects
in the Applies To list:
Object Results
Application Gets the path to the DataAnalysis executable, for example:
"C:\Program Files\DataAnalysis"
Analysis Gets the path to the file containing the analysis, for example: ":
"C:\Data Files\Demo\Analysis.d"
The Path property does not end the path with a backslash, unless the path has the
format "C:\."
Example
The following example gets the path to the analysis and displays it in a message box:
MsgBox [Link]

3.64 PeakEnd Property


Applies to: MSPeak object
Gets the m/z value at the end of an MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

3.65 PeakEndIntensity Property


Applies to: Compound object, MSPeak object
Gets the intensity at the end of a Compound or MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

DataAnalysis Script Reference Manual, Version 3.3 3-39


Automation Properties Bruker Daltonik GmbH

3.66 PeakStart Property


Applies to: MSPeak object
Gets the m/z value at the start of an MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

3.67 PeakStartIntensity Property


Applies to: Compound object, MSPeak object
Gets the intensity at the start of a Compound or MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

3.68 Polarity Property


Applies to: MS type ChromatogramDefinition objects (TICChromatogramDefini-
tion object, BPCChromatogramDefinition object, EICChromatogram-
Definition object, CNLChromatogramDefinition object), Spectrum
object
Gets or sets the polarity of an MS type ChromatogramDefinition or Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

3-40 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Polarity = daPositive positive polarity


daNegative negative polarity
daBoth positive and negative polarity
Example
The following example sets the polarity of TICChromatogramDefinition:
[Link] = daPositive

3.69 Purity Property


Applies to: LibrarySearchResult object
Gets the effective Purity score of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.70 Range Property


Applies to: BPCChromatogramDefinition object, EICChromatogramDefinition
object, CNLChromatogramDefinition object, MassPosChromato-
gramDefinition object, UV2DChromatogramDefinition object
Gets or sets the range of a ChromatogramDefinition object. The range defines the
intensities which has to be summed up (EIC, NL, UV2D) or within the maximum
intensity should be retrieved (BPC, MassPos).

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

DataAnalysis Script Reference Manual, Version 3.3 3-41


Automation Properties Bruker Daltonik GmbH

Range = {range} combined range, e.g., "290 – 350; 400" or single value 400
Example
The following example sets the range of BPCChromatogramDefinition:
[Link] = "300-400"

3.71 RetentionTime Property


Applies to: Chromatogram object, Compound object, LibrarySearchResult object
Gets the retention time value at defined index of a Chromatogram object.
Gets the retention time of a Compound object.
Gets the retention time of a LibrarySearchResult object.

Syntax
[Link]
[Link](n)
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
n An index value for the retention time to retrieve; applies only to the Chro-
matogram object.
Remarks
When accessing numerous retention time values of a chromatogram, the Chromato-
gramData method will be significantly faster.
Example
The following example displays the retention time end value of the first chromatogram.
dim chrom
set chrom = [Link](1)

MsgBox "The chromatogram ends at " +


CStr([Link]([Link])/60) + " minutes."

See Also
ChromatogramData method
Intensity property
LibrarySearchResults object

3-42 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.72 RetentionTimeEnd Property


Applies to: Compound object
Gets the retention time at which a Compound object ends.

Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

3.73 RetentionTimeOffset Property


Applies to: UV type ChromatogramDefinition objects (UVChromatogramDefini-
tion object, UV2DChromatogramDefinition object)
Gets or sets the retention time offset of a UV type ChromatogramDefinition object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the
Applies To list above.
RetentionTimeOffset Offset of a UV Chromatogram.
Example
The following example sets the retention time offset to 90 s:
[Link] = 90

3.74 RetentionTimeStart Property


Applies to: Compound object
Gets the retention time at which a Compound object starts.
Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-43


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a Compound object.

3.75 RFit Property


Applies to: LibrarySearchResult object
Gets the effective RFit score of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.76 SampleInfo Property


Applies to: Properties object
Gets the sample info of the analysis.

Syntax
[Link]
Parameters
object An expression that evaluates to a Properties object.
Example
MsgBox [Link]

3-44 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.77 ScanMode Property


Applies to: MS type ChromatogramDefinition objects (TICChromatogramDefini-
tion object, BPCChromatogramDefinition object, EICChromatogram-
Definition object, CNLChromatogramDefinition object), Spectrum
object
Gets or sets the scan mode of an MS type ChromatogramDefinition object or Spec-
trum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
ScanMode = daScanModeFullScan full scan mode
daScanModeMaxRes high resolution mode
daScanModeAll full scan and high resolution mode
Example
The following example sets the scan mode of TICChromatogramDefinition:
[Link] = daScanModeFullScan

3.78 ScriptVariable Property


Applies to: Analysis object
Gets and sets a string value to a variable of an Analysis object.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
VariableName A unique name for the variable. Variable names are not case-sensi-
tive.
Remarks
Variables are stored in the results of an analysis. The content of a variable can be
included in a print report using the dedicated report layout component.

DataAnalysis Script Reference Manual, Version 3.3 3-45


Automation Properties Bruker Daltonik GmbH

Example
The following example creates and sets a variable named ‘Test’ and assigns the string
value ‘15’ to it:
ScriptVariable("Test") = "15"
The following example displays the content of the variable named ‘Test’:
MsgBox ScriptVariable("Test")

3.79 SearchMass Property


Applies to: GenerateFormulaParameters object
Gets or sets the search mass of a GenerateFormulaParameters object to be looked
for in a mass spectrum.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets/gets the search mass of a GenerateFormulaParameters
object and displays it in a message box:
[Link] = 243.3
MsgBox [Link]

3.80 SearchRange Property


Applies to: GenerateFormulaParameters object
Gets or sets the range of a GenerateFormulaParameters object within the search
mass should be searched in a mass spectrum.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.

3-46 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Example
The following example sets/gets the search range of a GenerateFormulaParameters
object and displays it in a message box:
[Link] = 0.1
MsgBox [Link]

3.81 SeparationType Property


Applies to: Compound object
Gets the type of separation of a Compound object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Compound object.

3.82 SequenceNumbers Property


Applies to: Spectrum object
Gets the sequence numbers which contributed to a Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Spectrum object.

DataAnalysis Script Reference Manual, Version 3.3 3-47


Automation Properties Bruker Daltonik GmbH

3.83 SignalToNoise Property


Applies to: Compound object, MSPeak object
Gets the signal to noise ratio of a Compound or MSPeak object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

The following drawing illustrates the Signal and the Noise values.

Figure 3-1 Illustration of the Signal and the Noise values

3.84 Size Property


Applies to: Chromatogram object, Spectrum object
Gets the number of data points of a Chromatogram or Spectrum object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.

3-48 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

3.85 SpectrumComment Property


Applies to: LibrarySearchResult object
Gets the spectrum comment text of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.86 SpectrumInfo Property


Applies to: LibrarySearchResult object
Gets the spectrum information text of a LibrarySearchResult object.

Syntax
[Link]
Parameters
object An expression that evaluates to a LibrarySearchResult object.
See Also
LibrarySearchResults object

3.87 SumIntensity Property


Applies to: Spectrum object
Gets the sum of all intensity values of a Spectrum object.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-49


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a Spectrum object.

3.88 Tolerance Property


Applies to: GenerateFormulaParameters object
Gets or sets the tolerance of a GenerateFormulaParameters object in ppm.

Syntax
[Link]
Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets the tolerance to 0.01 ppm and then gets it again and dis-
plays it in a message box:
[Link] = 0.01
MsgBox [Link]

3.89 Type Property


Applies to: MSFilter object, all ChromatogramDefinition objects
Gets the type of object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
The following types are defined:
daMSFilterNONE No filter defined.
daMSFilterAll All mass spectra.
daMSFilterMS MS1 spectra only.
daMSFilterAllMSMS All MSn spectra.

3-50 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

daMSFilterMSMS A specific MSn spectrum of defined precursor.


daMSFilterMSMSplus A specific MSn spectrum of defined precursor
and all fragment spectra of it.
daMSFilterAllMSMS_2 All MS2 spectrum of defined precursor.
daMSFilterAllMSMS_3 All MS3 spectrum of defined precursor.
daMSFilterAllMSMS_4 All MS4 spectrum of defined precursor.
daMSFilterAllMSMS_5plus All MSn (n ≥ 5) spectrum of defined precursor.
Example
The following example gets the type of an MSFilter object and a TICChromatogram-
Definition object and displays them in a message box:
MsgBox [Link]
MsgBox [Link]

3.90 Unit Property


Applies to: Variable object
Gets the unit string value of a Variable object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Variable object.
See Also
Variable object
Variables object

3.91 UpperBoundaryFormula Property


Applies to: GenerateFormulaParameters object
Gets or sets the upper boundary formula of sum formulas to be generated of a
GenerateFormulaParameters object.
Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-51


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a GenerateFormulaParameters object.
Example
The following example sets/gets the upper boundary formula of a GenerateFormula-
Parameters object and displays it in a message box:
Dim GFP
Set GFP = CreateObject("[Link]")

[Link] = "C54H100N3O2S6"
MsgBox [Link]

3.92 Value Property


Applies to: Variable object
Gets the string value of a Variable object.
Syntax
[Link]
Parameters
object An expression that evaluates to a Variable object.
See Also
Variable object
Variables object

3.93 VariableName Property


Applies to: VarChromatogramDefinition object
Gets or sets the variable name of a VarChromatogramDefinition object.
Syntax
[Link]
Parameters
object An expression that evaluates to a VarChromatogramDefinition
object.

3-52 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

VariableName Name of a variable as shown in Edit Chromatograms dialog.


Example
The following example sets the variable name:
[Link] = "Vacuum High"

See Also
GroupName property

3.94 Version Property


Applies to: Application object
Gets the version of DataAnalysis.

Syntax
[Link]
Parameters
object An expression that evaluates to an Application object.
Remarks
The version is formatted as "[Link]-build", e.g., "[Link]".
Example
The following example gets the version of DataAnalysis and displays it in a message
box:
MsgBox [Link]

3.95 Visible Property


Applies to: Application object
Gets the condition of an Application object if the application is visible.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 3-53


Automation Properties Bruker Daltonik GmbH

Parameters
object An expression that evaluates to an Application object.
See Also
Hide method
Show method

3.96 Width Property


Applies to: MSPeak object
Gets the peak width of an MSPeak object.

Syntax
[Link]
Parameters
object An expression that evaluates to an MSPeak object.

3.97 WidthLeft, WidthRight Property


Applies to: BPCChromatogramDefinition object, EICChromatogramDefinition
object, CNLChromatogramDefinition object, MassPosChromato-
gramDefinition object
Extends the range if it is defined with single values to the left and to the right of a
ChromatogramDefinition object.

Syntax
[Link]
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Remarks
The default values are "0.5".

3-54 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Properties

Example
The following example sets the left and right width of a BPCChromatogramDefinition
object:
[Link] = 400.5
[Link] = 0.5
[Link] = 0.8

DataAnalysis Script Reference Manual, Version 3.3 3-55


Automation Properties Bruker Daltonik GmbH

3-56 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4 AUTOMATION METHODS
Methods are actions you take against objects. For example, to add a document to the
collection of open documents, you use the Add method of the Documents object.
For examples of using methods, see the macro sample provided with DataAnalysis.
The following methods are available:
Method Description
Activate Activates DataAnalysis
Add Adds a simple chromatogram to a Chromato-
grams object. Adds a partial sum formula
string to the formula in a SumFormula object.
AddChromatogram Adds a fully defined chromatogram to a
Chromatograms object.
AddChromatogramRangeSelection Adds a selection range to the current set of
selected ranges for the chromatograms of an
Analysis object.
AddChromatograms Adds several fully defined chromatograms at
once to a Chromatograms object.
AddRangeSelection Adds a selection range to the current set of
selected ranges for a Chromatogram object.
AverageMassSpectrum Calculates the average spectrum of the
selected range of a Chromatogram object
and creates a new Compound Mass Spectra
entry with the averaged spectrum.
BaselineSubtract Performs a baseline subtraction on spectra in
a Spectra object.
Caption Sets the caption in the script form of a Form
object.
ChromatogramData Gets the retention time and intensity vector of
a Chromatogram object.
Clear Deletes all items of a Chromatograms or
Compounds object.
ClearChromatogramRangeSelections Clears the chromatograms selection of an
Analysis object.
ClearRangeSelections Clears all selection ranges of a Chromato-
gram object. If no selected ranges are
defined, the full retention time and intensity

DataAnalysis Script Reference Manual, Version 3.3 4-1


Automation Methods Bruker Daltonik GmbH

range is then applied to other methods of the


Chromatogram object.
ClearResults Deletes the results of an Analysis object.
Close Closes the analysis of an Analysis object or
the script form of a Form object.
Deconvolute Deconvolutes all spectra in a Compounds or
Spectra object.
DeleteCompound Deletes a specific compound from a
Compounds object.
DeletePeak Deletes a specific peak from an MSPeakList
object.
DeleteScriptTable Deletes the script table of an Analysis object.
DoEvents Handles pending timer, sizing, or painting
events in the script form of a Form object.
ElementalComposition Calculates the elemental composition from the
formula of a SumFormula object.
Enable Enables or disables the script form of a Form
object.
Export Exports a single item or all items of a Chro-
matogram, Compound, Compounds,
Spectra or Spectrum object.
ExportMassList Exports the Mass List of a Spectrum object.
FindAutoMSn Finds peaks and iterates an Auto-LC-MS/MS
Analysis object using the AutoMS(n)
algorithm.
FindCompounds Finds peaks and integrates a chromatogram
trace of a Chromatogram object.
FindDissect Finds peaks and integrates an Analysis
object using the Dissect algorithm.
FindMSn Performs an automatic integration on an MRM
Analysis object.
GenerateFormula Generates a list of sum formulas in a Spectra
or Spectrum object.
Hide Hides the complete DataAnalysis application.
Hides the script form of a Form object.
HideMenu Hides the menu of the script form of a Form
object.

4-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Identify Identifies all spectra in a Compounds or


Spectra object.
IntegrateOnly Performs integration on a Chromatogram
object, but creates no average MS spectra.

Item Gets a specified Analysis, Chromatogram,


Compound, or Spectrum object from an
Analyses, Chromatograms, Compounds,
LibrarySearchResults, Spectra or Variables
object.
LoadMethod Loads a new method for an Analysis object.
MascotSearch Performs a Mascot Search of a protein or
peptide Analysis object using BioTools.
MassListClear Deletes the Mass List of all spectra in a
Compounds, Spectra or Spectrum object.
MassListFind Performs peak detection within specified m/z
range of all spectra in a Compounds,
Spectra or Spectrum object.
Maximize Maximizes the script form of a Form object.
Minimize Minimizes the script form of a Form object.
Noise Calculates the noise of the selected range of a
Chromatogram object.
Open Opens an analysis with a specified file name
in an Analyses object.
Pattern Calculates the theoretical pattern from the
formula of a SumFormula object.
Print Prints a report of an Analysis object.
PrintToPDF Prints a report of an Analysis object to a PDF
file.
RecalibrateIExternal Recalibrates the spectra of an Analysis
object externally by applying the recalibration
coefficients of another analysis.
RecalibrateInternal Recalibrates all spectra or a single spectrum
of an Analysis object internally as specified in
the parameter settings.
RelatedCompounds Gets the numbers of the compounds related
to a Chromatogram object.

DataAnalysis Script Reference Manual, Version 3.3 4-3


Automation Methods Bruker Daltonik GmbH

Restore Restores the script form of a Form object.


RunScript Starts the script of an Analysis object.
Save Saves the processing state of an Analysis
object including changes made to the
attached method.
SendReport Sends a report of an Analysis object as PDF
file attachment of an email.
SetScriptTableCellText Sets the cell content of a script table of an
Analysis object.
SetScriptTableColumnHeader Sets the column names of the script table of
an Analysis object.
Show Shows the DataAnalysis application after it
has been hidden completely. Shows a hidden
script form of a Form object again.
ShowMenu Shows a hidden menu of the script form of a
Form object again.
Smooth Smoothes the chromatogram or the spectrum
of a Chromatogram or Spectrum object
respectively all chromatograms or spectra of a
Chromatograms or Spectra object.
SpectrumData Gets the mass and intensity vector of a
Spectrum object.
Subtract Subtracts a partial sum formula string from the
formula of a SumFormula object.

4.1 Activate Method


Applies to: Application object
Activates DataAnalysis. If DataAnalysis is minimized its size will be restored, too.

Syntax
[Link](reserved)
Parameters
object An expression that evaluates to an Application object.
reserved This parameter is ignored.

4-4 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Example
The following example activates DataAnalysis without changing its current size, unless
it is minimized:
Set DA = GetObject("","[Link]")
[Link](0)

4.2 Add Method


Applies to: Chromatograms object, SumFormula object
Adds a simple chromatogram to a Chromatograms object. Adds a partial sum formula
string to the formula in a SumFormula object.

Syntax
[Link] (ChromatogramType, MSType, range, polarity)
[Link] formula
Parameters
object An expression that evaluates to one of the objects in the
Applies To list above.
ChromatogramType = daTIC Total ion chromatogram
daEIC Extracted ion chromatogram
daBPC Base peak chromatogram
MSType = daAll, All MS and MS/MS spectra
daAllMS All MS spectra
daAllMSn All MS(n) spectra
{ions} daughter ions, e.g., "289" or "672/289")
range = {range} combined range , e.g., "290 – 350; 400"
polarity = daPositive positive polarity
daNegative negative polarity
daBoth positive and negative polarity
formula A partial formula to add to a SumFormula object.
Example
The following example adds a total ion chromatogram of all positive MS and MSn
spectra to the Chromatograms collection:
[Link] daTIC, daAll, "", daPositive

DataAnalysis Script Reference Manual, Version 3.3 4-5


Automation Methods Bruker Daltonik GmbH

The following example adds a total ion chromatogram of all MS3 spectra with parent
m/z 290 in the first generation and m/z 150 in the second to the Chromatograms
collection:
[Link] daTIC, "290/150", "", daBoth
The following example adds a Methylen group (C2H) to Ethanol (C2H5OH) making up
Propanol and displays the hill-sorted sum formula of it:
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
[Link] "CH2"
MsgBox [Link]

See Also
AddChromatogram method
AddChromatograms method

4.3 AddChromatogram Method


Applies to: Chromatograms object
Adds a fully defined chromatogram to a Chromatograms object.

Syntax
[Link] ChromatogramDefinition
Parameters
object An expression that evaluates to a Chromatograms object.
ChromatogramDefinition An expression that evaluates a ChromatogramDefinition
object.
This can be one the following objects:
TICChromatogramDefinition
EICChromatogramDefinition
BPCChromatogramDefinition
CNLChromatogramDefinition
MassPosChromatogramDefinition
UVChromatogramDefinition
UV2DChromatogramDefinition
VARChromatogramDefinition

4-6 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Examples
The following example adds a chromatogram to the Chromatograms collection:
Dim TIC, VAR
Set TIC =
CreateObject("[Link]")
Set Var =
CreateObject("[Link]")
' do some definitions of TIC and Var...
[Link] TIC
[Link] Var

The following example adds a chromatogram acquired by HyStar to the Chromato-


grams collection:
dim UV
set UV = CreateObject("[Link]")

' add the first of the UV traces stored by HyStar


[Link] = HyStarUNTFileName + ": (1)"
[Link] = 0

[Link] UV

function HyStarUNTFileName
n = InStrRev([Link], ".")
HyStarUNTFileName = Left([Link], n-1) + ".unt"
end function

See Also
Add method
AddChromatograms method
ChromatogramDefinition objects

DataAnalysis Script Reference Manual, Version 3.3 4-7


Automation Methods Bruker Daltonik GmbH

4.4 AddChromatogramRangeSelection Method


Applies to: Analysis object
Adds a selection range to the current set of selected ranges for the chromatograms of
an Analysis object. The selected range is then applied to other methods of the Analy-
sis object.

Syntax
[Link] (RetTimeStart, RetTimeEnd, Intensity-
Start, IntensityEnd)
Parameters
object An expression that evaluates to an Analysis object.
RetTimeStart Start of the retention time range in minutes.
RetTimeEnd End of the retention time range in minutes.
IntensityStart (reserved for future use).
IntensityEnd (reserved for future use).
Example
The following example defines two selected ranges (10-15min and 20-22min) of the
Analysis object and runs the Find AutoMS(n) algorithm:
[Link] 10, 15, 0, 0
[Link] 20, 22, 0, 0
[Link]

See Also
FindAutoMSn method
ClearChromatogramRangeSelections method
FindDissect method

4-8 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.5 AddChromatograms Method


Applies to: Chromatograms object
Adds several fully defined chromatograms at once to a Chromatograms object.

Syntax
[Link] (chroms)
Parameters
object An expression that evaluates to a Chromatograms object.
Chroms An array of ChromatogramDefinition objects.
These can be one the following objects:
TICChromatogramDefinition
EICChromatogramDefinition
BPCChromatogramDefinition
CNLChromatogramDefinition
MassPosChromatogramDefinition
UVChromatogramDefinition
UV2DChromatogramDefinition
VARChromatogramDefinition
Example
The following example adds a three chromatogram traces to Chromatograms collec-
tion at once:
Dim Chroms(3)
Dim TIC, BPC, EIC

Set TIC =
CreateObject("[Link]")
Set EIC =
CreateObject("[Link]")
Set BPC =
CreateObject("[Link]")

' do some definitions with TIC, EIC, and BPC...


Set Chroms(0) = TIC
Set Chroms(1) = BPC
Set Chroms(2) = EIC

[Link](Chroms)

DataAnalysis Script Reference Manual, Version 3.3 4-9


Automation Methods Bruker Daltonik GmbH

See Also
Add method
AddChromatogram method
ChromatogramDefinition objects

4.6 AddRangeSelection Method


Applies to: Chromatogram object
Adds a selection range to the current set of selected ranges for a Chromatogram
object. The selected range is then applied to other methods of the Chromatogram
object.

Syntax
[Link] (RetTimeStart, RetTimeEnd, IntensityStart, Intensity-
End)
Parameters
object An expression that evaluates to a Chromatogram object.
RetTimeStart Start of the retention time range in minutes.
RetTimeEnd End of the retention time range in minutes.
IntensityStart (reserved for future use).
IntensityEnd (reserved for future use).
Example
The following example defines two selected ranges (10-15min and 20-22min) of the
Chromatogram object of the first chromatogram loaded:
[Link](1).AddRangeSelection 10, 15, 0, 0
[Link](1).AddRangeSelection 20, 22, 0, 0

See Also
AverageMassSpectrum method
ClearRangeSelections method
FindCompounds method
IntegrateOnly method

4-10 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.7 AverageMassSpectrum Method


Applies to: Chromatogram object
Calculates the average spectrum of the selected range of a Chromatogram object and
creates a new Compound Mass Spectra entry with the averaged spectrum. The mass
spectra being used for averaging are filtered to match the chromatogram definition of
the Chromatogram object.

Syntax
object. AverageMassSpectrum (bLine, bProfile)
Parameters
object An expression that evaluates to a Chromatogram object.
bLine A Boolean value. True will create an averaged line spectrum.
bProfile A Boolean value. True will create an averaged profile spectrum.
Example
The following example defines two selected ranges (10-15min and 20-22min) of the
Chromatogram object of the first chromatogram loaded and then calculates a profile
spectrum placed in the Compound Mass List.
[Link](1).AddRangeSelection 10, 15, 0, 0
[Link](1).AddRangeSelection 20, 22, 0, 0
[Link](1).AverageMassSpectrum false, true

See Also
AddRangeSelection method
ClearRangeSelections method

4.8 BaselineSubtract Method


Applies to: Spectra object
Performs a baseline subtraction on spectra in a Spectra object. The parameters for
this algorithm will be taken from method.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 4-11


Automation Methods Bruker Daltonik GmbH

Parameters
object An expression that evaluates to a Spectra object.
Example
The following example baseline subtracts each spectrum in the Spectra collection:
[Link]

4.9 Caption Method


Applies to: Form object
Sets the caption in the script form of a Form object.

Syntax
[Link] ( title )
Parameters
object An expression that evaluates to a Form object.
title A string specifying the new caption.
Example
The following example sets the caption "Demo" in the script form:
[Link] "Demo"

4.10 ChromatogramData Method


Applies to: Chromatogram object
Gets the retention time and intensity vector of a Chromatogram object.

Syntax
[Link] retentiontime_vector, intensity_vector
Parameters
object An expression that evaluates to a Chromatogram object.
retentiontime_vector A vector for the retention time values.
intensity_vector A vector for the intensity values.

4-12 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Remarks
When accessing numerous retention time/intensity values of a chromatogram, this
method will be significantly faster than using the RetentionTime or Intensity proper-
ties.
The vectors being filled with retention time and intensity values are zero-based.
Example
The following example calculates the total sum intensity of an chromatogram.
dim rt()
dim intensity()

dim chrom
set chrom = [Link](1)

[Link] rt, intensity

dim sum
sum = 0

MsgBox "The first chromatogram contains " +


CStr(UBound(intensity)) + " values."

dim i
for i = 0 to UBound(intensity)
sum = sum + intensity(i)
next

MsgBox "The total sum intensity is " + CStr(sum) + "."

See Also
SpectrumData method
RetentionTime property
Intensity property

DataAnalysis Script Reference Manual, Version 3.3 4-13


Automation Methods Bruker Daltonik GmbH

4.11 Clear Method


Applies to: Chromatograms object, Compounds object
Deletes all items of a Chromatograms or Compounds object.
Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example deletes all compounds in the Compounds collection:
[Link]

4.12 ClearChromatogramRangeSelections Method


Applies to: Analysis object
Clears the chromatograms selection of an Analysis object.
Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
See Also
AddChromatogramRangeSelection method

4.13 ClearRangeSelections Method


Applies to: Chromatogram object
Clears all selection ranges of a Chromatogram object. If no selected ranges are
defined, the full retention time and intensity range is then applied to other methods of
the Chromatogram object.

4-14 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Syntax
[Link]
Parameters
object An expression that evaluates to a Chromatogram object.
Example
The following example clears all selected of the Chromatogram object of the first
chromatogram loaded:
[Link](1).ClearRangeSelections

See Also
AddRangeSelection method
AverageMassSpectrum method
FindCompounds method
IntegrateOnly method

4.14 ClearResults Method


Applies to: Analysis object
Deletes the results of an Analysis object.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Example
The following example deletes the results in an Analysis.
[Link]

DataAnalysis Script Reference Manual, Version 3.3 4-15


Automation Methods Bruker Daltonik GmbH

4.15 Close Method


Applies to: Analysis object, Form object
Closes the analysis of an Analysis object or the script form of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Remarks
The [Link] command cannot be invoked in a script attached to an analy-
sis. This command can only be used from external scripts, e.g., from the Automation-
Engine, or applications other than DataAnalysis.
Example
The following example closes the script form.
[Link]

4.16 Deconvolute Method


Applies to: Compounds object, Spectra object
Deconvolutes all spectra of a Compounds or Spectra object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example deconvolutes each spectrum in the Compounds collection:
[Link]

4-16 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.17 DeleteCompound Method


Applies to: Compounds object
Deletes a specific compound from a Compounds object.

Syntax
[Link] ( n )
Parameters
object An expression that evaluates to a Compounds object.
n Number of compound to delete
Example
The following example deletes the first compound in the Compounds collection:
[Link] 1
The following example deletes all compounds in the Compounds collection, except for
the first:
For i = [Link] to 2 step -1
[Link] i
Next

See Also
Clear method

4.18 DeletePeak Method


Applies to: MSPeakList object
Deletes a specific peak from an MSPeakList object.

Syntax
[Link] ( n )
Parameters
object An expression that evaluates to an MSPeakList object.
n Number of peak to delete

DataAnalysis Script Reference Manual, Version 3.3 4-17


Automation Methods Bruker Daltonik GmbH

Example
The following example deletes all peaks of all precursor spectra of the first compound:
Dim Spec
For Each Spec in [Link](1)
If [Link] = daMSFilterMS Then
For i = [Link] to 1 to by -1
[Link] i
Next
End If
Next

4.19 DeleteScriptTable Method


Applies to: Analysis object
Deletes the script table of an Analysis object.

Syntax
[Link] TableName
Parameters
object An expression that evaluates to an Analysis object.
TableName Name of the table to delete
Remarks
The [Link] command cannot be invoked in a script attached to an analy-
sis. This command can only be used from external scripts, e.g., from the Automation-
Engine, or applications other than DataAnalysis.
Example
The following example deletes the script table "MyTable" of the analysis.
[Link] "MyTable"

See Also
SetScriptTableCellText method
SetScriptTableColumnHeader method

4-18 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.20 DoEvents Method


Applies to: Form object
Handles pending timer, sizing, or painting events in the script form of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.
Example
The following example handles pending events in the script form:
[Link]

4.21 ElementalComposition Method


Applies to: SumFormula object
Calculates the elemental composition from the formula of a SumFormula object.

Syntax
[Link] symbols, fractions
Parameters
Object An expression that evaluates to a SumFormula object.
symbols An array used to store the symbols of each present element.
fractions An array used to store the relative amount of each element.
Example
The following example calculates the elemental composition for ferrocene and demon-
strates how to access the resulting data.
Note: the arrays are start with index zero
dim symbols()
dim fractions()

dim SF
set SF = CreateObject("[Link]")

DataAnalysis Script Reference Manual, Version 3.3 4-19


Automation Methods Bruker Daltonik GmbH

[Link] = "C10H10Fe"
[Link] symbols, fractions

'how many different elements are available


MsgBox UBound(symbols) + 1

for n = 0 to UBound(symbols)
MsgBox symbols(n) & " " & fractions(n)
next

4.22 Enable Method


Applies to: Form object
Enables or disables the script form.

Syntax
[Link] [=boolean]
Parameters
object An expression that evaluates to a Form object.
boolean A Boolean that sets the state of the object. Possible values are:
True Enables the script form.
False Disables the script form.
Example
The following example browses all open analyses for the analysis named MyAnalysis.
If the analysis is found, it becomes the active analysis.
Dim myAnalysis
set Application = GetObject("",
"[Link]")
For Each myAnalysis in [Link]
If [Link] = "MyAnalysis" Then
[Link] = True
End If
Next

4-20 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.23 Export Method


Applies to: Chromatogram object, Compound object, Compounds object, Spec-
tra object, Spectrum object
Exports a single item or all items in a Chromatogram, Compound, Compounds,
Spectra, or Spectrum object.

Syntax
[Link] filename type
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
filename Destination, to which the export should be saved, if the filename is empty
DataAnalysis will generate a filename based on name of the analysis.
Compound and Compounds object:
type = daMGF Export in Mascot format (*.mgf)
daCSV Export in comma-separated-value ASCII format (*.csv)
daXML Export in XML format (*.xml)
Spectrum and Spectra object:
type = daMGF Export in Mascot format (*.mgf)
daASCII Export in ASCII format (*.ascii)
daXY Export in a simple ASCII format containing x-y values
only (*.xy)
daCSV Export in comma-separated-value ASCII format (*.csv)
daBSC Export a profile spectrum in BioTools ASCII format(*.bsc)
daXML Export in XML format (*.xml)
Chromatogram object:
type = daChemStation Export spectra in Agilent ChemStation format (*.d)
daASCII Export spectra in ASCII format (*.ascii)
daXY Export the chromatogram in a simple ASCII format
containing x-y values only (*.xy)
daCDF Export spectra in andi netCDF format (*.cdf)
Chromatogram object and daChemStation or daASCII type only:
spectrum = daLine Export line spectra; optional parameter, default is daLine
daProfile Export profile spectra; optional parameter
Remarks
The export to ASCII format (*.ascii) will export profile spectra if the spectrum parameter
is set to daProfile and if profile spectra are available. Otherwise, line spectra are
exported.

DataAnalysis Script Reference Manual, Version 3.3 4-21


Automation Methods Bruker Daltonik GmbH

Example
The following example deconvolutes each spectrum in the Compounds collection
object and exports the result as a Mascot file:
[Link]
[Link] "", daMGF

4.24 ExportMassList Method


Applies to: Spectrum object
Exports the Mass List of a Spectrum object.

Syntax
[Link] filename type
Parameters
object An expression that evaluates to a Spectrum object.
filename Destination, to which the export should be saved, if the filename is empty
DataAnalysis will generate a filename based on name of the analysis.
type = daASCII Export in blank-separated ASCII format (*.ascii)
daCSV Export in comma-separated-value ASCII format (*.csv)
Remarks
The mass list of a line spectrum contains all lines. The mass list of a profile spectrum
contains the peaks being found with one of the mass list peak finder algorithms. The
items of the Mass List being exported are determined by the Mass List Layout defined
in the related method parameters.
Example
The following example exports the first averaged spectrum in the Compound Mass List.
[Link](1).ExportMassList "", daASCII

See Also
Export method

4-22 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.25 FindAutoMSn Method


Applies to: Analysis object
Finds peaks and iterates an Auto-LC-MS/MS analysis Analysis object using the
AutoMS(n) algorithm. This will create a list of compounds, each with a FullScan, a
MaxRes, and an MSn compound mass spectrum.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Remarks

Example
The following performs an automatic integration on MRM analysis.
[Link]

See Also
AddChromatogramRangeSelection method

4.26 FindCompounds Method


Applies to: Chromatogram object, Chromatograms object
Finds peaks and integrates all chromatograms in the Chromatograms object or on a
single Chromatogram object. This will create a list of compounds with averaged
compound mass spectra. If ranges have been selected using the AddRangeSelection
method, only peaks within the selected ranges will be found.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following performs an automatic integration on analyses.

DataAnalysis Script Reference Manual, Version 3.3 4-23


Automation Methods Bruker Daltonik GmbH

Dim MyChromatogram
For each MyChromatogram in [Link]
[Link]
Next
' which is fully equivalent to:
[Link]

See Also
AddRangeSelection method
ClearRangeSelections method

4.27 FindDissect Method


Applies to: Analysis object
Finds peaks and integrates an Analysis object using the Dissect algorithm. This will
create a list of compounds with averaged compound mass spectra.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Remarks

Example
The following performs an automatic integration on MRM analysis.
[Link]

See Also
AddChromatogramRangeSelection method

4-24 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.28 FindMSn Method


Applies to: Analysis object
Performs an automatic integration on an MRM analysis Analysis object.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Example
The following performs an automatic integration on MRM analysis.
[Link]

4.29 GenerateFormula Method


Applies to: Spectra object, Spectrum object
Generates a list of sum formulas of a Spectra or Spectrum object.

Syntax
[Link] parameters, filename
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
parameters An expression that evaluates to a GenerateFormulaParameters object
filename Destination, to which the results list should be saved. If the file name is
empty DataAnalysis will generate a file name based on location and
name of the analysis.
Remarks
The results list will be written as a *.csv file.
Example
The following example generates formulas on each spectrum in the Spectra collection
object and exports the result to the specified file:

DataAnalysis Script Reference Manual, Version 3.3 4-25


Automation Methods Bruker Daltonik GmbH

Dim GFP
Set GFP =
CreateObject("[Link]")

[Link] = +1
[Link] = 3
[Link] = 8
[Link] = "C5H5Fe0"
[Link] = "C30H30Fe3"
[Link] = 50
[Link] = 0.001
[Link] = 186
[Link] = 0.5

[Link] GFP ,
"D:\Data\MyAnalysis.d\[Link]"

4.30 Hide Method


Applies to: Application object, Form object
Hides the complete DataAnalysis application. Hides the script form of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example hides the script form:
[Link]
The following example temporarily hides the DataAnalysis application during some
processing:
[Link]
’ do some processing...
[Link]

4-26 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

See Also
Show method

4.31 HideMenu Method


Applies to: Form object
Hides the script form menu of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.
Example
The following example hides the menu of the script form:
[Link]

4.32 Identify Method


Applies to: Compounds object, Spectra object, Spectrum object
Identifies all spectra of a Compounds or Spectra object.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example identifies each spectrum in the Compounds collection:
[Link]

DataAnalysis Script Reference Manual, Version 3.3 4-27


Automation Methods Bruker Daltonik GmbH

4.33 IntegrateOnly Method


Applies to: Chromatogram object, Chromatograms object
Performs integration on all chromatograms in the Chromatograms object or on a
single Chromatogram object, but creates no average MS spectra. If ranges have been
selected using the AddRangeSelection method, only peaks within the selected ranges
will be found.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following performs an automatic integration on analyses.
Dim MyChromatogram
For each MyChromatogram in a [Link]
[Link]
Next
' which is fully equivalent to:
[Link]

See Also
AddRangeSelection method
ClearRangeSelections method

4.34 Item Method


Applies to: Analyses object, Chromatograms object, Compounds object, Library-
SearchResults object Spectra object, Variables object
Gets a specified Analysis, Chromatogram, Compound, or Spectrum object from an
Analyses, Chromatograms, Compounds, LibrarySearchResults object, Spectra or
Variables object.
Syntax
[Link] [index]

4-28 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

-or-

object index
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
index A Variant that is a Long or String representing the appropriate analysis,
layout, processed spectrum, spectrum, or trace.
• If you specify a Long, the Item method fetches the object by its one-
based index in the collection.
• If you specify a String, it must be one of the strings described in the
following table:
Object String
Analyses
Remarks
If you specify numbers for index, do not store these for later use because the indices
might change as objects are added or removed.
The Item method is the default. Accordingly, you don't have to reference Item explicitly,
as shown in the syntax.
Note that the first valid index is ‘1’ – not‘0’.
Example
The following example prints all open analyses:
for num = 1 to [Link]
Msgbox [Link](num).Name
Analyses(num).Print("Chromatogram Report")
next

4.35 LoadMethod Method


Applies to: Analysis object
Loads a new method for an Analysis object.

Syntax
[Link] ( MethodName )
Parameters
object An expression that evaluates to an Analysis object.

DataAnalysis Script Reference Manual, Version 3.3 4-29


Automation Methods Bruker Daltonik GmbH

MethodName A String that specifies the method file name. If no drive and path is
included the method is loaded from the default method folder.
Example
The following loads a method from the default method folder.
[Link] "Metabolite.m"
The following loads a method by specifying the full path name.
[Link] "D:\MyMethods\Test.m"

4.36 MascotSearch Method


Applies to: Analysis object
Performs a Mascot Search of a protein or peptide Analysis object using BioTools.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Remarks
This method requires that the Bruker Daltonics BioTools™ 2.0 application is installed
on the system and BioTools being properly setup to search on a Mascot database.
Example
The following performs an automatic integration on analyses.
[Link]
[Link]
[Link]

4.37 MassListClear Method


Applies to: Compounds object, Spectra object, Spectrum object,
Deletes the Mass List of all spectra in a Compounds, Spectra or Spectrum object.
Syntax
[Link]

4-30 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following code performs MassListClear on each spectrum in a Spectra object:
[Link]

4.38 MassListFind Method


Applies to: Compounds object, Spectra object, Spectrum object
Performs peak detection within specified m/z range of all spectra in a Compounds,
Spectra or Spectrum object.

Syntax
[Link] ( start, end )
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Start Start m/z value
End End m/z value
Example
The following code performs MassListFind on each spectrum in a Spectra object:
val = [Link](250, 400)

4.39 Maximize Method


Applies to: Form object
Maximizes the script form of a Form object.
Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.

DataAnalysis Script Reference Manual, Version 3.3 4-31


Automation Methods Bruker Daltonik GmbH

Example
The following example maximizes the script form:
[Link]

4.40 Minimize Method


Applies to: Form object
Minimizes of the script form of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.
Example
The following example minimizes the script form:
[Link]

4.41 Noise Method


Applies to: Chromatogram object
Calculates the noise of the selected range of a Chromatogram object.

The signal-to-noise ratio determination differs to the one used in the Find Compounds
algorithm only, that it is using a fixed, small smoothing width. The steps for determina-
tion the noise level simplifies to:
1. The third derivative of the chromatogram is calculated using the Savitzky-Golay
algorithm with a smoothing width m=1. The simplified formula then is:
1 1
y 'i = y i +1 − y i −1
2 2

4-32 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

2. The standard deviation σ of all values of the third derivative y''' is determined.
2
N
y ' ' 'i
σ = ∑
i =1 N
The determination of an internal threshold by a histogram approach as in the
signal-to-noise determination in Find Compounds does not apply, if the region
selected does not contain chromatographic peaks.

3. The signal-to-noise ratio S/N of each peak is then calculated as:


S/N = S / 5σ , with S = peak height above the peak baseline.
The noise N is determined as 5σ; statistically 99% of the noise values are within
this range.

The following drawing illustrates the Signal and the Noise values.

Figure 4-1 Illustration of the Signal and the Noise values

Syntax
object. Noise
Parameters
object An expression that evaluates to a Chromatogram object.
Example
The following example defines a selected range (10-15min) of the first chromatogram
loaded and then determines and displays the noise.
[Link](1).AddRangeSelection 10, 15, 0, 0
noise = [Link](1).Noise
MsgBox "Noise (10-15min) = " + CStr(noise)

DataAnalysis Script Reference Manual, Version 3.3 4-33


Automation Methods Bruker Daltonik GmbH

See Also
AddRangeSelection method
ClearRangeSelections method

4.42 Open Method


Applies to: Analyses object
Opens an analysis with a specified file name in an Analyses object.

Syntax
[Link] ( PathName )
Parameters
object An expression that evaluates to an Analyses object.
PathName A String that specifies the full path to the analysis.
Example
The following example opens the analysis file C:\Data Files\Demo\Sample.d\Ana-
[Link]:
set myAnalysis = [Link]("C:\Data
Files\Demo\Sample.d\[Link]")

See Also
Close method

4.43 Pattern Method


Applies to: SumFormula object
Calculates the theoretical pattern from the formula of a SumFormula object.

Syntax
[Link] charge, bHighResolution, m_over_z, intensities
Parameters
Object An expression that evaluates to a SumFormula object.
Charge The charge state which should be considered for calculation.

4-34 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

bHighResolution A flag indicating whether to resolve isobaric species or not.


m_over_z An array used to store calculated m/z values.
intensities An array used to store relative abundances of each resulting peak.
Example
The following example calculates the pattern for ferrocene and demonstrates how to
access the resulting data.
Note: Arrays starting with index zero.
dim m_over_z()
dim intensities()

dim SF
set SF = CreateObject("[Link]")

[Link] = "C10H10Fe"
[Link] 1, 0, m_over_z, intensities

'how many m/z I pairs are available


MsgBox UBound(m_over_z) + 1

for n = 0 to UBound(m_over_z)
MsgBox m_over_z(n) & " " & I(n)
next

4.44 Print Method


Applies to: Analysis object
Prints a report of an Analysis object.
Syntax
[Link] layout
Parameters
object An expression that evaluates to an Analysis object.
layout Report layout name.
Remarks
Layouts for DataAnalysis are currently exclusively being stored below the dedicated
folder “C:\BDalSystemData\Report Layouts\DataAnalysis”.

DataAnalysis Script Reference Manual, Version 3.3 4-35


Automation Methods Bruker Daltonik GmbH

The Report layout name may be specified without the instrument category and without
the “.layout“ extension of the report layout filename. Thus, “Display Report”,
“Esquire\Display Report”, or “Display [Link]” are all legal and equivalent
settings.
Printing thru automation (this command) always uses the non-direct printing mode. The
direct printing mode available in the Print dialog cannot be applied here.
Example
The following prints the “Display Report” report.
[Link] "Display Report"

4.45 PrintToPDF Method


Applies to: Analysis object
Prints a report of an Analysis object to a PDF file.

Syntax
[Link] layout [, filename]
Parameters
object An expression that evaluates to an Analysis object.
layout Report layout name.
filename Full path of the PDF file to write. This parameter is optional; if it is not
specified, the PDF will be stored in the analysis folder with the filename
“[Link]”.
Remarks
Layouts for DataAnalysis are currently exclusively being stored below the dedicated
folder “C:\BDalSystemData\Report Layouts\DataAnalysis”.
The Report layout name may be specified without the instrument category and without
the “.layout“ extension of the report layout filename. Thus “Display Report”,
“Esquire\Display Report” or “Display [Link]” are all legal and equivalent
settings.
Example
The following prints the “Generic Display Report” report to “[Link]” in the analysis
folder.
[Link] "Generic Display Report"

4-36 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.46 RecalibrateExternal Method


Applies to: Analysis object
Recalibrates the spectra of an Analysis object externally by applying the recalibration
coefficients of another analysis.
Syntax
[Link] ( PathName )
Parameters
object An expression that evaluates to an Analysis object.
PathName A String that specifies the full path to the analysis.
Example
The following example recalibrates the analysis with the calibration from another analy-
sis:
[Link] "D:\Data\RefAnalysis.d"

4.47 RecalibrateInternal Method


Applies to: Analysis object, Spectrum object
Recalibrates all spectra or a single spectrum of an Analysis or Spectrum object
internally as specified in the parameter settings.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Remarks
If a complete chromatographic analysis is to be recalibrated internally, the analysis is
recalibrated based on the first spectrum in the Compound List ([Link](0))
which is not part of a Compound. The internal recalibration is performed on this spec-
trum and then applied to all other spectra of this analysis. Note, that the method para-
meter settings for the recalibration must be properly set to contain peaks being found in
this first spectrum.

DataAnalysis Script Reference Manual, Version 3.3 4-37


Automation Methods Bruker Daltonik GmbH

If a specific spectrum of a chromatographic analysis is recalibrated the recalibration is


also applied to all other spectra.
If a single-spectrum analysis is to be recalibrated internally, the analysis is also recali-
brated based on the first spectrum, too ([Link](0)).
Example
The following example recalibrates the analysis internally based on the recalibration of
the first spectrum not being part of a compound:
[Link]
The following example recalibrates a chromatographic analysis internally based on the
recalibration of the second spectrum of the first compound:
[Link](1)(2).RecalibrateInternal

4.48 RelatedCompounds Method


Applies to: Chromatogram object
Gets the numbers of the compounds related to a Chromatogram object.

Syntax
[Link] compound_nr_vector
Parameters
object An expression that evaluates to a Chromatogram object.
compound_nr_vector A vector for the compound number values.
Remarks
The vector being filled with compound numbers is zero-based.
Example
The following example displays the related compounds for the first chromatogram:
dim cpmds()
dim text, i, c

dim Chrom
set Chrom = [Link](1)

[Link] cpmds

if UBound(cpmds) > 0 then

4-38 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

text = "Chromatogram 1 has the following related


compounds:" & vbCR
for i = 0 to UBound(cpmds)
c = cpmds(i)
text = " " & text & " " & CStr(c) & ": "
text = text & [Link](c).Name & vbCR
next
else
text = "Chromatogram 1 has no related compounds."
end if

MsgBox text

4.49 Restore Method


Applies to: Form object
Restores the script form of a Form object.

Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.
Example
The following example restores the script form:
[Link]

4.50 RunScript Method


Applies to: Analysis object
Starts the script of an Analysis object.

Syntax
[Link]

DataAnalysis Script Reference Manual, Version 3.3 4-39


Automation Methods Bruker Daltonik GmbH

Parameters
object An expression that evaluates to an Analysis object.
Example
The following example starts the script of an analysis:
[Link]

4.51 Save Method


Applies to: Analysis object
Saves the processing state of an Analysis object including changes made to the
attached method.

Syntax
[Link]
Parameters
object An expression that evaluates to an Analysis object.
Example
The following example saves the analysis:
[Link]

4.52 SendReport Method


Applies to: Analysis object
Sends a report of an Analysis object as PDF file attachment of an email.

Syntax
[Link] layout, email
Parameters
object An expression that evaluates to an Analysis object.
layout Report layout name.
email Email address.

4-40 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Remarks
Layouts for DataAnalysis are currently exclusively being stored below the dedicated
folder “C:\BDalSystemData\Report Layouts\DataAnalysis”.
The Report layout name may be specified without the instrument category and without
the “.layout“ extension of the report layout filename. Thus, “Display Report”,
“Esquire\Display Report” or “Display [Link]” are all legal and equivalent
settings.
Example
The following sends an email with the “Generic Display Report” report attached to an
email recipient defined in the local address book (My Colleague).
[Link] "Generic Display Report", "My Colleague"

4.53 SetScriptTableCellText Method


Applies to: Analysis object
Sets the cell content of a script table of an Analysis object.

Syntax
[Link] TableName, ColumnNumber, RowNumber, CellText
Parameters
object An expression that evaluates to an Analysis object.
TableName Name of the table
ColumnNumber Column number of the cell
RowNumber Row number of the cell
CellText Text to set into the cell
Remarks
Script tables can only be filled through the automation interface. Its content can only be
examined by printing (or print preview).
Example
The following example creates a script table named "MassAccuracyTable" with 4
columns and fills in 2 rows:
Dim i
Dim TableName
Dim TargetMass(2)
Dim ActualMass(2)

DataAnalysis Script Reference Manual, Version 3.3 4-41


Automation Methods Bruker Daltonik GmbH

Dim Accuracy(2)

TableName = "MassAccuracyTable"
TargetMass(1) = "509.20"
TargetMass(2) = "612.40"
ActualMass(1) = "509.25"
ActualMass(2) = "509.42"
Accuracy(1) = "0.05"
Accuracy(2) = "0.02"

'Delete any previous table


[Link] TableName

'Fill table header


[Link] TableName, 1, "Peak"
[Link] TableName, 2, "Mass
target"
[Link] TableName, 3, "Mass actual"
[Link] TableName, 4, "Mass
accuracy"

'Fill table
for i = 1 to 2
[Link] TableName, 1, i, CStr(i)
[Link] TableName, 2, i,
TargetMass(i)
[Link] TableName, 3, i,
ActualMass(i)
[Link] TableName, 4, i,
Accuracy(i)
Next
This Sample can be printed out using a report layout containing a "Scripting Table"
component with the "Variable Name" property set to "MassAccuracyTable".

4-42 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

4.54 SetScriptTableColumnHeader Method


Applies to: Analysis object
Sets the column names of the script table of an Analysis object.

Syntax
[Link] TableName, ColumnNumber, HeaderText
Parameters
object An expression that evaluates to an Analysis object.
TableName Name of the table
ColumnNumber Column number
HeaderText Text to set as header
Remarks
Script tables can only be filled through the automation interface. Its content can only be
examined by printing (or print preview).
See Also
SetScriptTableCellText method

4.55 Show Method


Applies to: Application object, Form object
Shows the DataAnalysis application after it has been hidden completely. Shows a
hidden script form of a Form object again.

Syntax
[Link]
Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following example shows a hidden script form again:
[Link]

DataAnalysis Script Reference Manual, Version 3.3 4-43


Automation Methods Bruker Daltonik GmbH

The following example temporarily hides the DataAnalysis application during some
processing:
[Link]
’ do some processing...
[Link]

See Also
Hide method

4.56 ShowMenu Method


Applies to: Form object
Shows a hidden menu of the script form of a Form object again.

Syntax
[Link]
Parameters
object An expression that evaluates to a Form object.
Example
The following example shows a hidden script form again:
[Link]

4.57 Smooth Method


Applies to: Chromatogram object, Chromatograms object, Spectra object, Spec-
trum object
Smoothes the chromatogram or the spectrum of a Chromatogram or Spectrum object
respectively all chromatograms or spectra of a Chromatograms or Spectra object.
The parameters for this algorithm are specified in the method.

Syntax
[Link]

4-44 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Methods

Parameters
object An expression that evaluates to one of the objects in the Applies To list
above.
Example
The following code smoothes all spectra of a mass spectrum analysis:
[Link]

4.58 SpectrumData Method


Applies to: Spectrum object
Gets the mass and intensity vector of a Spectrum object.

Syntax
[Link] mass_vector, intensity_vector
Parameters
object An expression that evaluates to a Spectrum object.
mass_vector A vector for the m/z values.
intensity_vector A vector for the intensity values.
Remarks
When accessing numerous mass/intensity values of a chromatogram, this method will
be significantly faster than using the Mass or Intensity properties.
The vectors being filled with m/z and intensity values are zero-based.
Example
The following example calculates the total sum intensity of a chromatogram.
dim mass()
dim intensity()

dim spec
set spec = [Link](1)(1)

[Link] mass, intensity

dim sum
sum = 0

DataAnalysis Script Reference Manual, Version 3.3 4-45


Automation Methods Bruker Daltonik GmbH

MsgBox "The first MS contains " + CStr(UBound(intensity)) + "


values."

dim i
for i = 0 to UBound(intensity)
sum = sum + intensity(i)
next

MsgBox "The total sum intensity is " + FormatNumber(sum) + "."

See Also
ChromatogramData method
Mass property
Intensity property

4.59 Subtract Method


Applies to: SumFormula object
Subtracts a partial sum formula string from the formula of a SumFormula object.

Syntax
[Link] formula
Parameters
object An expression that evaluates to a SumFormula object.
formula A partial formula
Example
The following example subtracts a Methylen group (CH2) to Ethanol (C2H5OH) making
up Methanol and displays the hill-sorted sum formula of it:
dim SF
set SF = CreateObject("[Link]")

[Link] = "C2H5OH"
[Link] "CH2"
MsgBox [Link]

4-46 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Automation Events

5 AUTOMATION EVENTS
Events are not supported.

DataAnalysis Script Reference Manual, Version 3.3 5-1


Automation Events Bruker Daltonik GmbH

5-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Index

INDEX

ClearRangeSelections method ............. 4-14


A ClearResults method ............................ 4-15
Activate method...................................... 4-4 Close method........................................ 4-16
Active property........................................ 3-6 CNLChromatogramDefinition object ....... 2-8
ActiveAnalysis property .......................... 3-7 Comment property ................................ 3-13
Add method ............................................ 4-5 Compound object.................................. 2-11
AddChromatogram method .................... 4-6 CompoundComment property .............. 3-13
AddChromatogramRangeSelection CompoundName property .................... 3-13
method................................................ 4-8 Compounds object ................................ 2-13
AddChromatograms method .................. 4-9 Count property ...................................... 3-14
AddRangeSelection method................. 4-10
Algorithm property .................................. 3-7 D
Analyses object ...................................... 2-4 DateCreated property ........................... 3-15
Analysis object........................................ 2-5 Deconvolute method............................. 4-16
Application object ................................... 2-6 DeconvolutedMolweight property ......... 3-15
ApplyNitrogenRule property ................... 3-8 DeconvolutionComponent property ...... 3-15
Area property.......................................... 3-8 Definition property................................. 3-16
Automation methods .............................. 4-1 DeleteCompound method..................... 4-17
Automation objects................................. 2-1 DeletePeak method .............................. 4-17
Automation properties ............................ 3-1 DeleteSriptTable method ...................... 4-18
AutoSearchMonoIsotopicPeak property. 3-9 DoEvents method ................................. 4-19
AverageMass property ........................... 3-9 DoubleBondEquivalenceMaximum
AverageMassSpectrum method ........... 4-11 property............................................. 3-16
DoubleBondEquivalenceMinimum
B property............................................. 3-17
BackgroundType property .................... 3-10
BaselineEndIntensity property.............. 3-10 E
BaselineStartIntensity property ............ 3-11 EICChromatogramDefinition object ........ 2-8
BaselineSubtract method ..................... 4-11 ElectronConfiguration property ............. 3-17
BPCChromatogramDefinition object ...... 2-8 ElementalComposition method............. 4-19
ElementalCounts property .................... 3-18
C Enable method...................................... 4-20
Caption method .................................... 4-12 Export method....................................... 4-21
CASRegistryNumber property.............. 3-11 ExportMassList method ........................ 4-22
Charge property.................................... 3-11
ChargeState property ........................... 3-12 F
Chromatogram object............................. 2-7 Filename property ................................. 3-19
Chromatogram property ....................... 3-12 FindAutoMSn method ........................... 4-23
ChromatogramData method................. 4-12 FindCompounds method ...................... 4-23
ChromatogramDefinition objects ............ 2-8 FindDissect method .............................. 4-24
Chromatograms object ......................... 2-10 FindMSn method................................... 4-25
Clear method ........................................ 4-14 FirstMass property ................................ 3-20
ClearChromatogramRangeSelections FirstRetentionTime property ................. 3-20
method.............................................. 4-14 Fit property............................................ 3-21

DataAnalysis Script Reference Manual, Version 3.3 I-1


Index Bruker Daltonik GmbH

Form object........................................... 2-14 object .................................................. 2-8


Formula property .................................. 3-21 Maximize method.................................. 4-31
FragmentationPath property................. 3-22 MaximumIntensity property................... 3-33
FullName property................................ 3-22 Minimize method................................... 4-32
MinimumIntensity property.................... 3-34
G MolWeight property............................... 3-34
GenerateFormula method .................... 4-25 MonoIsotopicMass property.................. 3-34
GenerateFormulaParameters object.... 2-14 MSFilter object ...................................... 2-17
Group property ..................................... 3-23 MSFilter property .................................. 3-35
GroupName property............................ 3-24 MSPeak object...................................... 2-18
MSPeakList object ................................ 2-19
H MSPeakList property ............................ 3-36
HasIdentifiedMS property..................... 3-24
HasIdentifiedMSMS property ............... 3-25 N
HasIdentifiedNegativePolarity property 3-25 Name property ...................................... 3-36
HasIdentifiedPositivePolarity property . 3-26 Noise method........................................ 4-32
HasLibrarySearchResults property ...... 3-26 NominalMass property.......................... 3-37
HCRatioMaximum property .................. 3-27 NumberOfFormula property.................. 3-38
HCRatioMinimum property ................... 3-27
Height property ..................................... 3-27 O
Hide method ......................................... 4-26 Object hierarchy...................................... 2-1
HideMenu method ................................ 4-27 Open method ........................................ 4-34
I P
Identify method ..................................... 4-27 Path property ........................................ 3-38
InstrumentName property..................... 3-28 Pattern method ..................................... 4-34
IntegrateOnly method........................... 4-28 PeakEnd property ................................. 3-39
Intensity property .................................. 3-28 PeakEndIntensity property.................... 3-39
IsChromatographicAnalysis property ... 3-29 PeakStart property ................................ 3-40
Item method.......................................... 4-28 PeakStartIntansity property .................. 3-40
Polarity property.................................... 3-40
L Print method.......................................... 4-35
LastMass property................................ 3-29 Properties object ................................... 2-20
LastRetentionTime property ................. 3-30 Purity property....................................... 3-41
LibraryNames property......................... 3-30
LibrarySearchResult object .................. 2-15 R
LibrarySearchResults object ................ 2-16 Range property ..................................... 3-41
LoadMethod method ............................ 4-29 Recalibrate method............................... 4-37
Logging property .................................. 3-31 RecalibrateInternal method................... 4-37
LowerBoundaryFormula property......... 3-31 RelatedCompounds method ................. 4-38
Restore method .................................... 4-39
M RetentionTime property ........................ 3-42
m_over_z property ............................... 3-32 RetentionTimeEnd property.................. 3-43
MascotSearch method ......................... 4-30 RetentionTimeOffset property............... 3-43
Mass property....................................... 3-32 RetentionTimeStart property................. 3-43
MassListClear method.......................... 4-30 RFit property ......................................... 3-44
MassListFind method ........................... 4-31 RunScript method ................................. 4-39
MassPosChromatogramDefinition

I-2 DataAnalysis Script Reference Manual, Version 3.3


Bruker Daltonik GmbH Index

S T
SampleInfo property ............................. 3-44 TICChromatogramDefinition object ........ 2-8
Save method ........................................ 4-40 Tolerance property................................ 3-50
ScanMode property .............................. 3-45 Type property........................................ 3-50
ScriptVariable property......................... 3-45
SearchMass property ........................... 3-46 U
SearchRange property ......................... 3-46 Unit property ......................................... 3-51
SendReport method ............................. 4-40 UpperBoundaryFormula property ......... 3-51
SeparationType property...................... 3-47 UV2DChromatogramDefinition object..... 2-8
SequenceNumbers property ................ 3-47 UVChromatogramDefinition object ......... 2-8
SetScriptTableCellText method............ 4-41
SetScriptTableColumnHeader method 4-43 V
Show method........................................ 4-43 Value property....................................... 3-52
ShowMenu method .............................. 4-44 VARChromatogramDefinition objects ..... 2-8
SignalToNoise property........................ 3-48 Variable object ...................................... 2-24
Size property ........................................ 3-48 VariableName property......................... 3-52
Smooth method .................................... 4-44 Variables object .................................... 2-25
Spectra object....................................... 2-21 Version property.................................... 3-53
Spectrum object.................................... 2-21 Visible property ..................................... 3-53
SpectrumComment property ................ 3-49
SpectrumInfo property.......................... 3-49
W
Subtract method ................................... 4-46 Width property....................................... 3-54
SumFormula object .............................. 2-23 WidthLeft property................................. 3-54
SumIntensity property .......................... 3-49 WidthRight property .............................. 3-54

DataAnalysis Script Reference Manual, Version 3.3 I-3


Index Bruker Daltonik GmbH

I-4 DataAnalysis Script Reference Manual, Version 3.3

 
 
  
 
 
 
Script Reference Manual
COPYRIGHT 
Copyright 2005 
Bruker Daltonik GmbH 
All other trademarks are the sole property of their respective owners.
Bruker Daltonik GmbH 
Contents 
CONTENTS 
1 PREFACE .........................................................................
Contents 
Bruker Daltonik GmbH 
3.16 
CompoundComment Property ..............................................................
Bruker Daltonik GmbH 
Contents 
3.64 
PeakEnd Property.......................................................................
Contents 
Bruker Daltonik GmbH 
4.12 
ClearChromatogramRangeSelections Method................................................
Bruker Daltonik GmbH 
Contents 
5 AUTOMATION EVENTS .........................................................................
Contents 
Bruker Daltonik GmbH 
 
 
DataAnalysis Script Reference Manual, Version 3.3 
viii
Bruker Daltonik GmbH 
Preface 
1 
PREFACE 
The Bruker Daltonics DataAnalysis 3.3 application (in the following ‘DataAnalaysis
Preface 
Bruker Daltonik GmbH 
 
 
DataAnalysis Script Reference Manual, Version 3.3 
1-2

You might also like