Difference between revisions of "ALTADataSet.Question"

From ReliaWiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet Class|ALTADataSet]]}}
 
{{Template:API}}{{Template:APIBreadcrumb|.[[ALTADataSet Class|ALTADataSet]]}}
 
{{Template:InProgress}}
 
{{Template:InProgress}}
 
  
 
<onlyinclude>Occurs when an answer to a question is required. Displays a message box with yes and no options.</onlyinclude>  
 
<onlyinclude>Occurs when an answer to a question is required. Displays a message box with yes and no options.</onlyinclude>  
Line 21: Line 20:
 
:Required. Indicates which button was pressed on a message box returned by Visual Basic's MsgBox function. Can be any MsgBoxResult constant (see [https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.msgboxresult.aspx Microsoft's reference documentation for this enum]).
 
:Required. Indicates which button was pressed on a message box returned by Visual Basic's MsgBox function. Can be any MsgBoxResult constant (see [https://msdn.microsoft.com/en-us/library/microsoft.visualbasic.msgboxresult.aspx Microsoft's reference documentation for this enum]).
  
<!---== Example ==
+
<!--== Example ==
 
The following example provides a simple demonstration on how to customize the event procedure.
 
The following example provides a simple demonstration on how to customize the event procedure.
 
  '''VBA'''
 
  '''VBA'''
Line 36: Line 35:
 
     ads.UseEvents = True
 
     ads.UseEvents = True
 
   
 
   
   {{APIComment|'Define a stress type with a use stress level of 300.}}
+
   {{APIComment|'Define two stress types.}}
     {{APIPrefix|Call}} ads.AddStressDefinition({{APIString|"Stress1"}}, , 300)  
+
     {{APIPrefix|Call}} ads.AddStressDefinition({{APIString|"Temperature"}}, , 300)
 +
    {{APIPrefix|Call}} ads.AddStressDefinition({{APIString|"Humidity"}}, , 0.3)
 +
 +
  {{APIComment|'Select to use the Temperature-Humidity model with a Weibull distribution.}}
 +
    ads.AnalysisSettings.ModelType = ALTASolverModel_TempHumidity
 +
    ads.AnalysisSettings.Distribution = ALTASolverDistribution_Weibull
 +
 +
  {{APIComment|'Trigger the event by analyzing an incomplete data set.}}
 +
    {{APIPrefix|Call}} ads.AddFailure_3(248, 1, 406, 0.5)
 +
    {{APIPrefix|Call}} ads.AddFailure_3(456, 1, 416, 0.7)
 +
    {{APIPrefix|Call}} ads.AddFailure_3(528, 1, 426, 0.9)
 
   
 
   
  {{APIComment|'Trigger the event by analyzing a data set that has a single data point.}}
 
    {{APIPrefix|Call}} ads.AddFailure_2(100, 1, 190)
 
 
     ads.Calculate
 
     ads.Calculate
 
     Msgbox({{APIString|"End"}})
 
     Msgbox({{APIString|"End"}})
Line 66: Line 73:
 
     ads.UseEvents = True
 
     ads.UseEvents = True
 
   
 
   
   {{APIComment|'Define a stress type with a use stress level of 300.}}
+
   {{APIComment|'Define two stress types.}}
     {{APIPrefix|Call}} ads.AddStressDefinition({{APIString|"Stress1"}}, , 300)  
+
     ads.AddStressDefinition({{APIString|"Temperature"}}, , 300)
 +
    ads.AddStressDefinition({{APIString|"Humidity"}}, , 0.3)
 +
 +
  {{APIComment|'Select to use the Temperature-Humidity model with a Weibull distribution.}}
 +
    ads.AnalysisSettings.ModelType = ALTASolverModel.TempHumidity
 +
    ads.AnalysisSettings.Distribution = ALTASolverDistribution.Weibull
 +
 +
  {{APIComment|'Trigger the event by analyzing an incomplete data set.}}
 +
    ads.AddFailure(248, 1, 406, 0.5)
 +
    ads.AddFailure(456, 1, 416, 0.7)
 +
    ads.AddFailure(528, 1, 426, 0.9)
 
   
 
   
  {{APIComment|'Trigger the event by analyzing a data set that has a single data point.}}
 
    ads.AddFailure(100, 1, 190)
 
 
     ads.Calculate
 
     ads.Calculate
 
     Msgbox({{APIString|"End"}})
 
     Msgbox({{APIString|"End"}})
Line 76: Line 91:
 
   
 
   
 
  {{APIComment|'----------------------------}}
 
  {{APIComment|'----------------------------}}
   {{APIPrefix|Private Sub}} wds_Question(''msg'' {{APIPrefix|As String}}, ''Buttons'' {{APIPrefix|As MsgBoxStyle}}, _
+
   {{APIPrefix|Private Sub}} ads_Question(''msg'' {{APIPrefix|As String}}, ''Buttons'' {{APIPrefix|As MsgBoxStyle}}, _
 
                           {{APIPrefix|ByRef}} ''Answer'' {{APIPrefix|As MsgBoxResult}}) {{APIPrefix|Handles}} ads.Question
 
                           {{APIPrefix|ByRef}} ''Answer'' {{APIPrefix|As MsgBoxResult}}) {{APIPrefix|Handles}} ads.Question
 
   {{APIComment|'<Add code here to handle the event.>}}
 
   {{APIComment|'<Add code here to handle the event.>}}
 
     MsgBox (msg, vbYesNoCancel)
 
     MsgBox (msg, vbYesNoCancel)
 
   {{APIPrefix|End Sub}}
 
   {{APIPrefix|End Sub}}
--->
+
-->

Latest revision as of 00:01, 7 September 2016

APIWiki.png


Member of: SynthesisAPI.ALTADataSet

DRAFT GRAY.png

WORK IN PROGRESS
ALTADataSet.Question

DRAFT GRAY.png

Occurs when an answer to a question is required. Displays a message box with yes and no options.


Remarks: To hide the messages or write your own code for the event procedure, set the UseEvents property of the object to True. The event is raised by the class methods.

Syntax

_Question(msg, Buttons, ByRef Answer)

Parameters

sMsg

Required. String. The message to display.

Buttons

Required. The buttons to display when calling Visual Basic's MsgBox function. Can be any MsgBoxStyle constant (see Microsoft's reference documentation for this enum).

Answer

Required. Indicates which button was pressed on a message box returned by Visual Basic's MsgBox function. Can be any MsgBoxResult constant (see Microsoft's reference documentation for this enum).