ALTADataSet.ClearDataSet: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
m (Protected "ALTADataSet.ClearDataSet" ([edit=sysop] (indefinite) [move=sysop] (indefinite)) [cascading])
No edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet_Class|ALTADataSet]]}}


Provides a method to clear the raw data entered into the ALTADataSet.


== Method Syntax  ==
<onlyinclude>Clears all data in the data set and removes the fitted model, if any. </onlyinclude>
{{APIName|'''ClearDataSet'''()}}<br>
{{APIComment|Clears all data and fitted model. All analysis settings stay unchanged.}}


== Usage Example ==
== Syntax ==
'''.ClearDataSet()'''


{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
        Dim ALTADS as New ALTADataSet


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
== Example ==
        Dim sp = New ALTAStressProfile("Profile1")
        sp.RepeatCycle = True
        sp.AddSegment(1, 250)
        sp.AddSegment(2, 300)
        sp.AddSegment(3, 400)


{{APIComment|Add the stress profile. See [[ALTADataSet.AddStressProfile]] for additional details}}
'''VBA'''
        ALTADS.AddStressProfile(sp)
{{APIComment|'Declare a new ALTADataSet object.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Define a stress type.}}
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
 
{{APIComment|'Add failure times for Stress1 &#61; 190.}}
  {{APIPrefix|Call}} ADS.AddFailure_2(100, 1, 190)
  {{APIPrefix|Call}} ADS.AddFailure_2(120, 1, 190)
  {{APIPrefix|Call}} ADS.AddFailure_2(130, 1, 190)
{{APIComment|'Clear the defined stress and failure times from the data set.}}
  {{APIPrefix|Call}} ADS.ClearDataSet()


{{APIComment|Use ClearDataSet to clear data and fitted model.}}
        '''ALTADS.ClearDataSet'''


{{APIComment|Get the number of failures. In this example, NumberOfFailures will be 0.}}
 
        Dim NumberOfFailures as Integer
'''VB.NET'''
        NumberOfFailures = ALTADS.FailureCount
 
{{APIComment|'Declare a new ALTADataSet object.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Define a stress type.}}
  ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
 
{{APIComment|'Add failure times for Stress1 &#61; 190.}}
  ADS.AddFailure(100, 1, 190)
  ADS.AddFailure(120, 1, 190)
  ADS.AddFailure(130, 1, 190)
 
{{APIComment|'Clear the defined stress and failure times from the data set.}}
  ADS.ClearDataSet()

Latest revision as of 23:34, 5 May 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Clears all data in the data set and removes the fitted model, if any.

Syntax

.ClearDataSet()


Example

VBA

 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define a stress type. 
  Call ADS.AddStressDefinition("Stress1",,10)
  
 'Add failure times for Stress1 = 190. 
  Call ADS.AddFailure_2(100, 1, 190)
  Call ADS.AddFailure_2(120, 1, 190)
  Call ADS.AddFailure_2(130, 1, 190)

 'Clear the defined stress and failure times from the data set. 
  Call ADS.ClearDataSet()


VB.NET
 
 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define a stress type. 
  ADS.AddStressDefinition("Stress1",,10)
 
 'Add failure times for Stress1 = 190. 
  ADS.AddFailure(100, 1, 190)
  ADS.AddFailure(120, 1, 190)
  ADS.AddFailure(130, 1, 190)
 
 'Clear the defined stress and failure times from the data set. 
  ADS.ClearDataSet()