ALTASegment Class: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
{{Template:APIClass|ALTAStressProfile Class|ALTAStressProfile}}
{{Template:API}}{{Template:APIBreadcrumb}}
Used with the [[ALTAStressProfile.GetSegments]] method to return each segment of a stress profile.
 
 
Represents the time segment of an associated [[ALTAStressProfile Class|ALTAStressProfile]] object.


== Properties ==
== Properties ==
{| {{APITable}}
|-
| style="width: 180px;"|SegmentEnd||The segment's end time. '''Double'''.
|-
|SegmentStart||The segment's start time. '''Double'''.
|-
|Stress||The stress level throughout the segment. '''Double'''.
|}


*SegmentStart (as ''double'') {{APIComment|The segment's start time.}}
== Example==
*SegmentEnd   (as ''double'') {{APIComment|The segment's end time.}}
 
*Stress      (as ''double'') {{APIComment|The stress level throughout the segment.}}
'''VBA'''
{{APIComment|'Declare an ALTAStressProfile object.}}
  {{APIPrefix|Dim}} SP {{APIPrefix|As New}} ALTAStressProfile
    
{{APIComment|'Add segments.}}
  {{APIPrefix|Call}} SP.AddSegment(1, 250)
  {{APIPrefix|Call}} SP.AddSegment(2, 300)
  {{APIPrefix|Call}} SP.AddSegment(3, 400)
 
{{APIComment|'Get segments.}}
  {{APIPrefix|Dim}} StressSegments() {{APIPrefix|As}} ALTASegment
  StressSegments = SP.GetSegments
 
{{APIComment|'Get the start time of the first segment.}}
  {{APIPrefix|Dim}} SegStart {{APIPrefix|As}} Double
  SegStart = StressSegments(0).SegmentStart


== Usage Example==
'''VB.NET'''
  {{APIComment|'Declare an ALTAStressProfile object. See [[ALTAStressProfile Class|ALTAStressProfile]].}}
 
  Dim SP As New ALTAStressProfile("Profile1")
  {{APIComment|'Declare an ALTAStressProfile object.}}
  {{APIPrefix|Dim}} SP {{APIPrefix|As New}} ALTAStressProfile
    
    
  {{APIComment|'Add segments.}}
  {{APIComment|'Add segments.}}
  SP.AddSegment(1, 250)
  SP.AddSegment(1, 250)
  SP.AddSegment(2, 300)
  SP.AddSegment(2, 300)
  SP.AddSegment(3, 400)
  SP.AddSegment(3, 400)
    
    
  {{APIComment|'Get segments.}}
  {{APIComment|'Get segments.}}
  Dim StressSegments() As ALTASegment
  {{APIPrefix|Dim}} StressSegments() {{APIPrefix|As}} ALTASegment
  StressSegments = SP.GetSegments
  StressSegments = SP.GetSegments
    
    
  {{APIComment|'Get the start time of the first segment.}}
  {{APIComment|'Get the start time of the first segment.}}
  Dim SegStart As Double
  {{APIPrefix|Dim}} SegStart {{APIPrefix|As}} Double
  SegStart = StressSegments(0).SegmentStart
  SegStart = StressSegments(0).SegmentStart

Revision as of 22:03, 19 April 2016

APIWiki.png


Member of: SynthesisAPI


Represents the time segment of an associated ALTAStressProfile object.

Properties

Name Description
SegmentEnd The segment's end time. Double.
SegmentStart The segment's start time. Double.
Stress The stress level throughout the segment. Double.

Example

VBA

 'Declare an ALTAStressProfile object. 
  Dim SP As New ALTAStressProfile
 
 'Add segments. 
  Call SP.AddSegment(1, 250)
  Call SP.AddSegment(2, 300)
  Call SP.AddSegment(3, 400)
 
 'Get segments. 
  Dim StressSegments() As ALTASegment
  StressSegments = SP.GetSegments
 
 'Get the start time of the first segment. 
  Dim SegStart As Double
  SegStart = StressSegments(0).SegmentStart
VB.NET
 
 'Declare an ALTAStressProfile object. 
  Dim SP As New ALTAStressProfile
 
 'Add segments. 
  SP.AddSegment(1, 250)
  SP.AddSegment(2, 300)
  SP.AddSegment(3, 400)
 
 'Get segments. 
  Dim StressSegments() As ALTASegment
  StressSegments = SP.GetSegments
 
 'Get the start time of the first segment. 
  Dim SegStart As Double
  SegStart = StressSegments(0).SegmentStart