ALTADataSet.AddSuspension: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:APIClass|ALTADataSet Class|ALTADataSet}}
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet_Class|ALTADataSet]]}}<div style="border:1px solid #D0CDE8; background:#EEEDF7; border-radius:10px; width:auto; margin:0 0 1em 1em; padding:1em; float:right;"><span style="font-family:arial;font-size:5;color:#585858">Other Versions: [[ALTADataSet.AddSuspension 10|Version 10]]</span></div>
Adds suspensions to the data set.


== Syntax ==
<ul>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress()}}
{{APIPrefix|As Object}}
{{APIName|)}}
{{APIComment|{{Template:ALTADataSet.AddSuspension1.Cmt}}}}
</li>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress1}}
{{APIPrefix|As Object}}
{{APIName|)}}
{{APIComment|{{Template:ALTADataSet.AddSuspension2.Cmt}}}}
</li>
<li>
AddSuspension(
{{APIName|Value}}
{{APIPrefix|As Double}}
{{APIName|,}}
{{APIName|NumberInGroup}}
{{APIPrefix|As Integer}}
{{APIName|,}}
{{APIName|Stress1}}
{{APIPrefix|As Object}}
{{APIName|,}}
{{APIName|Stress2}}
{{APIPrefix|As Object}}
{{APIName|)}}{{APIComment|{{Template:ALTADataSet.AddSuspension3.Cmt}}}}
</li>
</ul>


Parameters
<onlyinclude>Adds suspensions to the data set.</onlyinclude>
:''Value'': The suspension time.


:''NumberInGroup'': The number of units that were suspended at the ''Value'' time.
==Syntax==
'''VBA'''
'''.AddSuspension'''(''Value'', ''NumberinGroup'', {{APIPrefix|ByRef}} ''Stress()'')
'''.AddSuspension_2'''(''Value'', ''NumberinGroup'', ''Stress1'')
'''.AddSuspension_3'''(''Value'', ''NumberinGroup'', ''Stress1'', ''Stress2'')


{{Template:ALTADataSet.StressParameters.Cmt}}
'''VB.NET'''
'''.AddSuspension'''(''Value'', ''NumberinGroup'', {{APIPrefix|ByRef}} ''Stress()'')
'''.AddSuspension'''(''Value'', ''NumberinGroup'', ''Stress1'')
'''.AddSuspension'''(''Value'', ''NumberinGroup'', ''Stress1'', ''Stress2'')


== Usage Example ==
===Parameters===
''Value''
:Required. Double. The suspension time.


{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
''NumberinGroup''
        Dim ALTADS as New ALTADataSet
:Required. Integer. The number of suspended units at the time of suspension.  


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
''Stress()''
        Dim sp = New ALTAStressProfile("Profile1")
:Required. Object. Can be an array of numeric stress values or [[CProfile_Class|cProfile]] objects.
        sp.RepeatCycle = True
        sp.AddSegment(1, 250)
        sp.AddSegment(2, 300)
        sp.AddSegment(3, 400)


{{APIComment|Add values to the raw data.}}
''Stress1''
        ALTADS.AddSuspension(1, 1, sp)
:Required. Object. The stress value for the first stress definition. Can be a numeric stress value or [[CProfile_Class|cProfile]] object.
        ALTADS.AddSuspension(2, 1, sp)
        ALTADS.AddSuspension(3, 1, sp)


{{APIComment|Get the number of suspensions. In this example, NumberOfSuspension will be 3.}}
''Stress2''
        Dim NumberOfSuspension as Integer
:Required. Object. The stress value for the second stress definition. Can be a numeric stress value or [[CProfile_Class|cProfile]] object.
        NumberOfSuspension = ALTADS.SuspensionCount
 
 
== Example ==
The following example demonstrates how to add suspensions to an ALTADataSet object.
 
'''VBA'''
{{APIComment|'Declare a new ALTADataSet object.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Define a stress type with use stress level &#61; 10.}}
  {{APIPrefix|Call}} ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
 
{{APIComment|'Add suspensions for Stress1 &#61; 190.}}
  {{APIPrefix|Call}} ADS.AddSuspension_2(100, 1, 190)
  {{APIPrefix|Call}} ADS.AddSuspension_2(120, 1, 190)
  {{APIPrefix|Call}} ADS.AddSuspension_2(130, 1, 190)
 
'''VB.NET'''
 
{{APIComment|'Declare a new ALTADataSet object.}}  
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
 
{{APIComment|'Define a stress type with use stress level &#61; 10.}}
  ADS.AddStressDefinition({{APIString|"Stress1"}},,10)
 
{{APIComment|'Add suspensions for Stress1 &#61; 190.}}
  ADS.AddSuspension(100, 1, 190)
  ADS.AddSuspension(120, 1, 190)
  ADS.AddSuspension(130, 1, 190)
 
== See Also ==
*[[ALTADataSet.AddStressProfile|ALTADataSet.AddStressProfile Method]]

Latest revision as of 23:42, 22 March 2017

APIWiki.png


Member of: SynthesisAPI.ALTADataSet

Other Versions: Version 10


Adds suspensions to the data set.

Syntax

VBA

.AddSuspension(Value, NumberinGroup, ByRef Stress())

.AddSuspension_2(Value, NumberinGroup, Stress1)

.AddSuspension_3(Value, NumberinGroup, Stress1, Stress2)
VB.NET

.AddSuspension(Value, NumberinGroup, ByRef Stress())

.AddSuspension(Value, NumberinGroup, Stress1)

.AddSuspension(Value, NumberinGroup, Stress1, Stress2)

Parameters

Value

Required. Double. The suspension time.

NumberinGroup

Required. Integer. The number of suspended units at the time of suspension.

Stress()

Required. Object. Can be an array of numeric stress values or cProfile objects.

Stress1

Required. Object. The stress value for the first stress definition. Can be a numeric stress value or cProfile object.

Stress2

Required. Object. The stress value for the second stress definition. Can be a numeric stress value or cProfile object.


Example

The following example demonstrates how to add suspensions to an ALTADataSet object.

VBA

 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define a stress type with use stress level = 10. 
  Call ADS.AddStressDefinition("Stress1",,10)
  
 'Add suspensions for Stress1 = 190. 
  Call ADS.AddSuspension_2(100, 1, 190)
  Call ADS.AddSuspension_2(120, 1, 190)
  Call ADS.AddSuspension_2(130, 1, 190)
VB.NET
 
 'Declare a new ALTADataSet object.  
  Dim ADS As New ALTADataSet
 
 'Define a stress type with use stress level = 10. 
  ADS.AddStressDefinition("Stress1",,10)
 
 'Add suspensions for Stress1 = 190. 
  ADS.AddSuspension(100, 1, 190)
  ADS.AddSuspension(120, 1, 190)
  ADS.AddSuspension(130, 1, 190)

See Also