RawDataSet Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
Line 17: Line 17:
This usage example demonstrates how to create a simple raw data set and add it to a repository's Reliability Data Warehouse (RDW). Full application examples are available at [[Synthesis_API_Reference#Application_Examples]].
This usage example demonstrates how to create a simple raw data set and add it to a repository's Reliability Data Warehouse (RDW). Full application examples are available at [[Synthesis_API_Reference#Application_Examples]].


  {{APIComment|'Create a new RawDataSet object. See [[RawDataSet Class|RawDataSet]].}}
  {{APIComment|'Create a new RawDataSet object and specify its properties.}}
   Dim RDW As New RawDataSet
   Dim RDW As New RawDataSet
    
    
  {{APIComment|'Create a new RawData object, and specify a part name and number. See [[RawData Class|RawData]].}}
  {{APIComment|'Create a new RawDataSet object. See [[RawDataSet Class|RawDataSet]].}}
  Dim rawDS As New RawDataSet
{{APIComment|'Give rawDS a name and specify that it is for use with Weibull++.}}
  rawDS.ExtractedName = "Example for RDW"
  rawDS.ExtractedType = RawDataSetType.Weibull
{{APIComment|'Create two new RawData objects, each containing a failure time. See [[RawData Class|RawData]].}}
   Dim row1 As New RawData
   Dim row1 As New RawData
   row1.PartName = "Frame"
   row1.StateFS = "F"
   row1.PartNumber = "FRM"
   row1.StateTime = "100"
    
  {{APIComment|'Add a row to RawDataSet object with the specified part name and number.}}
  Dim row2 As New RawData
   RDW.AddDataRow(row1)
   row2.StateFS = "F"
    
  row2.StateTime = "120"
  {{APIComment|'Add the two failure times as two rows in rawDS.}}
   rawDS.AddDataRow(row1)
   rawDS.AddDataRow(row2)
  {{APIComment|'Connect to a Synthesis repository.}}
  {{APIComment|'Connect to a Synthesis repository.}}
   Dim MyRepository As New Repository
   Dim MyRepository As New Repository
   MyRepository.ConnectToRepository("C:\Users\Name\Documents\ReliaSoft\Files\database.rsr9")
   MyRepository.ConnectToRepository("C:\Users\ckahn\Documents\ReliaSoft\Files\APITesting.rsr9")
   
 
  {{APIComment|'Add the raw data to the Raw Data Warehouse in the repository.}}
  {{APIComment|'Add rawDS to the Raw Data Warehouse in the repository.}}
   MyRepository.SaveRawDataSet(RDW)
   MyRepository.SaveRawDataSet(rawDS)
 
  {{APIComment|'Disconnect from repository.}}
  {{APIComment|'Disconnect from repository.}}
   MyRepository.DisconnectFromRepository()
   MyRepository.DisconnectFromRepository()

Revision as of 18:11, 6 May 2014


To view an added data set in Weibull++ or RGA, choose Project > Synthesis > RDW to Folio.

Methods

Properties

  • ExtractedName (as string) Gets or sets the name of the data set.
  • ExtractedDate (as date) Gets or sets the date when the data set was extracted.
  • ExtractedBy (as string) Gets or sets the name of the person who extracted the data set.
  • ExtractedType (as AnalyticalDataSetType) Gets or sets whether the data set is for use with Weibull++ or RGA.

Usage Example

This usage example demonstrates how to create a simple raw data set and add it to a repository's Reliability Data Warehouse (RDW). Full application examples are available at Synthesis_API_Reference#Application_Examples.

 'Create a new RawDataSet object and specify its properties. 
 Dim RDW As New RawDataSet
 
 'Create a new RawDataSet object. See RawDataSet. 
 Dim rawDS As New RawDataSet

 'Give rawDS a name and specify that it is for use with Weibull++. 
 rawDS.ExtractedName = "Example for RDW"
 rawDS.ExtractedType = RawDataSetType.Weibull

 'Create two new RawData objects, each containing a failure time. See RawData. 
 Dim row1 As New RawData
 row1.StateFS = "F"
 row1.StateTime = "100"

 Dim row2 As New RawData
 row2.StateFS = "F"
 row2.StateTime = "120"

 'Add the two failure times as two rows in rawDS. 
 rawDS.AddDataRow(row1)
 rawDS.AddDataRow(row2)

 'Connect to a Synthesis repository. 
 Dim MyRepository As New Repository
 MyRepository.ConnectToRepository("C:\Users\ckahn\Documents\ReliaSoft\Files\APITesting.rsr9")
  
 'Add rawDS to the Raw Data Warehouse in the repository. 
 MyRepository.SaveRawDataSet(rawDS)

 'Disconnect from repository. 
 MyRepository.DisconnectFromRepository()