AddDataRow Method: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|RawDataSet Class|RawDataSet}}
{{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}}
Adds a row of raw data to the raw data set.


==Syntax==
*AddDataRow( {{APIPrefix|ByVal}} row {{APIPrefix|As RawData}})


Parameters
<onlyinclude>Adds a new [[RawData Class|RawData]] object, which represents a data point, to the SDW data collection</onlyinclude>
:''row'': An instance of the [[RawData Class|RawData]] class, which will be added as a row to the raw data set.


==Usage Example==
== Syntax ==
  {{APIComment|'Create a new RawDataSet object. See [[RawDataSet Class|RawDataSet]].}}
  '''.RawDataSet.AddDataRow'''(''row '')
   Dim RDW As New RawDataSet
 
 
=== Parameters ===
  {{APIComment|'Create a new RawData object, and specify a part name and number. See [[RawData Class|RawData]].}}
''row''
   Dim row1 As New RawData
:The [[RawData Class|RawData]] object to be added.
   row1.PartName = "Frame"
 
   row1.PartNumber = "FRM"
== Example ==
    
'''VBA'''
  {{APIComment|'Add a row to RawDataSet object with the specified part name and number.}}
   RDW.AddDataRow(row1)
{{APIComment|'Create an SDW data collection.}}  
   {{APIPrefix|Dim}} SDWData {{APIPrefix|As New}} RawDataSet
  {{APIComment|'Add code to create new data points. For example, the following code defines a couple of failure data.}}
  {{APIPrefix|Dim}} Data1 {{APIPrefix|As New}} RawData
  {{APIPrefix|Dim}} Data2 {{APIPrefix|As New}} RawData
  Data1.StateFS = "F"
  Data1.StateTime = "100"
  Data2.StateFS = "F"
  Data2.StateTime = "120"
{{APIComment|'Add the two data points to the SDW data collection.}}
  {{APIPrefix|Call}} SDWData.AddDataRow(Data1)
  {{APIPrefix|Call}} SDWData.AddDataRow(Data2)
 
'''VB.NET'''
{{APIComment|'Create an SDW data collection.}}
  {{APIPrefix|Dim}} SDWData {{APIPrefix|As New}} RawDataSet
{{APIComment|'Add code to create new data points. For example, the following code defines a couple of failure data.}}
   {{APIPrefix|Dim}} Data1 {{APIPrefix|As New}} RawData
  {{APIPrefix|Dim}} Data2 {{APIPrefix|As New}} RawData
   Data1.StateFS = "F"
  Data1.StateTime = "100"
   Data2.StateFS = "F"
   Data2.StateTime = "120"
  {{APIComment|'Add the two data points to the SDW data collection.}}
   SDWData.AddDataRow(Data1)
  SDWData.AddDataRow(Data2)

Revision as of 22:29, 23 July 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Adds a new RawData object, which represents a data point, to the SDW data collection

Syntax

.RawDataSet.AddDataRow(row )

Parameters

row

The RawData object to be added.

Example

VBA 

 'Create an SDW data collection.  
 Dim SDWData As New RawDataSet

 'Add code to create new data points. For example, the following code defines a couple of failure data. 
 Dim Data1 As New RawData
 Dim Data2 As New RawData
 Data1.StateFS = "F"
 Data1.StateTime = "100"
 Data2.StateFS = "F"
 Data2.StateTime = "120"

 'Add the two data points to the SDW data collection. 
 Call SDWData.AddDataRow(Data1)
 Call SDWData.AddDataRow(Data2)
VB.NET 

 'Create an SDW data collection.  
 Dim SDWData As New RawDataSet

 'Add code to create new data points. For example, the following code defines a couple of failure data. 
 Dim Data1 As New RawData
 Dim Data2 As New RawData
 Data1.StateFS = "F"
 Data1.StateTime = "100"
 Data2.StateFS = "F"
 Data2.StateTime = "120"

 'Add the two data points to the SDW data collection. 
 SDWData.AddDataRow(Data1)
 SDWData.AddDataRow(Data2)