ALTADataSet.PlotUseStress: 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]]}}
{{Template:ALTADataSet.PlotUseStress.Cmt}}


To set the use stress level for calculations, use the FittedModel.SetUseStress method.


== Syntax==
<onlyinclude>Sets the use stress value to be plotted (does not affect results of calculations). '''Double'''. The Index parameter is an integer that specifies the stress index, where 0 = first stress, 1 = second stress, etc.</onlyinclude>
<ul><li>
PlotUseStress(
Index
{{APIPrefix|As Integer}}
)
{{APIPrefix|As Double}}
</li></ul>


Parameters
== Example ==
:''Index'': The index of the stress column (e.g., 0 = the first stress, 1 = the second, etc.).
The following example demonstrates how to create a use level probability plot for an ALTA single-stress analysis.  


== Usage Example ==
'''VBA'''
{{APIComment|Declare the ALTADataSet. See [[New ALTADataSet]] for additional details.}}
        Dim ALTADS as New ALTADataSet
{{APIComment|'Declare a new ALTADataSet object.}}
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
{{APIComment|'Add code to create an ALTA data set and analyze it.}}
{{APIComment|...}} 
{{APIComment|'Declare a new WAPlots object.}}
  {{APIPrefix|Dim}} APlot {{APIPrefix|As New}} WAPlots
 
{{APIComment|'Add the analyzed data set to the plot.}}
  {{APIPrefix|Call}} APlot.AddDataset(ADS)
{{APIComment|'Create a use level probability plot for use stress &#61; 200.}}
{{APIComment|'This example assumes that an image control called "Image1" already exists in the active Excel sheet.}}
  ADS.PlotUseStress(0) = 200 
  {{APIPrefix|Set}} Image1.Picture = APlot.CreatePlotVB6(WAPlotType_UseLevelProbability)


{{APIComment|Declare an [[ALTAStressProfile Class|ALTAStressProfile]]. See [[ALTAStressProfile Class|ALTAStressProfile]] for additional details.}}
'''VB.NET'''
        Dim sp = New ALTAStressProfile("Profile1")
        sp.RepeatCycle = True
{{APIComment|'Declare a new ALTADataSet object.}}
        sp.AddSegment(1, 250)
  {{APIPrefix|Dim}} ADS {{APIPrefix|As New}} ALTADataSet
        sp.AddSegment(2, 300)
        sp.AddSegment(3, 400)
{{APIComment|'Add code to create an ALTA data set and analyze it.}}
 
{{APIComment|...}} 
{{APIComment|Add the stress profile. See [[ALTADataSet.AddStressProfile]] for additional details}}
        ALTADS.AddStressProfile(sp)
{{APIComment|'Declare a new WAPlots object.}}
 
  {{APIPrefix|Dim}} APlot {{APIPrefix|As New}} WAPlots
{{APIComment|Set the Use Stress level for the stress profile.}}
 
        ALTADS.PlotUseStress(0) = 200
{{APIComment|'Add the analyzed data set to the plot.}}
  APlot.AddDataset(ADS)
{{APIComment|'Create a use level probability plot for use stress &#61; 200.}}
{{APIComment|'This example assumes that a PictureBox control called "PictureBox1" already exists in the Windows Form project.}}
  ADS.PlotUseStress(0) = 200  
  PictureBox1.Image = APlot.CreatePlot(WAPlotType.UseLevelProbability)

Latest revision as of 17:00, 24 June 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet


Sets the use stress value to be plotted (does not affect results of calculations). Double. The Index parameter is an integer that specifies the stress index, where 0 = first stress, 1 = second stress, etc.

Example

The following example demonstrates how to create a use level probability plot for an ALTA single-stress analysis.

VBA

 'Declare a new ALTADataSet object. 
  Dim ADS As New ALTADataSet

 'Add code to create an ALTA data set and analyze it. 
 ...   

 'Declare a new WAPlots object. 
  Dim APlot As New WAPlots
 
 'Add the analyzed data set to the plot. 
  Call APlot.AddDataset(ADS)

 'Create a use level probability plot for use stress = 200. 
 'This example assumes that an image control called "Image1" already exists in the active Excel sheet. 
  ADS.PlotUseStress(0) = 200   
  Set Image1.Picture = APlot.CreatePlotVB6(WAPlotType_UseLevelProbability)
VB.NET

 'Declare a new ALTADataSet object. 
  Dim ADS As New ALTADataSet

 'Add code to create an ALTA data set and analyze it. 
 ...   

 'Declare a new WAPlots object. 
  Dim APlot As New WAPlots
 
 'Add the analyzed data set to the plot. 
  APlot.AddDataset(ADS)

 'Create a use level probability plot for use stress = 200. 
 'This example assumes that a PictureBox control called "PictureBox1" already exists in the Windows Form project. 
  ADS.PlotUseStress(0) = 200   
  PictureBox1.Image = APlot.CreatePlot(WAPlotType.UseLevelProbability)