CProfile.GetSegments: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) (Created page with '{{DISPLAYTITLE:cProfile.GetSegments}}{{Template:API}}{{Template:APIBreadcrumb|.cProfile}}{{InProgress}} <onlyinclude>Returns an array of [[ProfileSegment Cla…') |
(No difference)
|
Revision as of 18:47, 27 September 2016
Member of: SynthesisAPI.cProfile Template:InProgress
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)