cProfile.GetSegments
Jump to navigation
Jump to search
Member of: SynthesisAPI.cProfile
Returns an array of ProfileSegment objects that represent the segments in the profile.
Syntax
.GetSegments()
Example
This example assumes that a profile with ID #1 exists in the first project of a Synthesis repository.
VBA 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr11") 'Get profile #1 from project #1. Dim Resource As cProfile MyRepository.Project.SetCurrentProject(1) Set Resource = MyRepository.Profile.GetProfile(1) 'Get the profile's segments. Dim ListofSegments() As ProfileSegment ListofSegments = Resource.GetSegments 'Output sample: Display the value of the first segment. MsgBox (ListofSegments(0).Value)
VB.NET 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr11") 'Get profile #1 from project #1. Dim Resource As cProfile MyRepository.Project.SetCurrentProject(1) Resource = MyRepository.Profile.GetProfile(1) 'Get the profile's segments. Dim ListofSegments() As ProfileSegment ListofSegments = Resource.GetSegments 'Output sample: Display the value of the first segment. MsgBox (ListofSegments(0).Value)