CProfile.SetSegments

Adds segments to the profile.

Syntax
.SetSegment( arr)

Parameters
arr
 * Required. An array of ProfileSegment objects.

Example
VBA myResource SynthesisAPI.cProfile myResource.Name = myResource.ProfileType = ProfileTypeEnum_Stress myResource.IsCyclical = True segment SynthesisAPI.ProfileSegment listOfSegments(1) SynthesisAPI.ProfileSegment segment = SynthesisAPI.ProfileSegment segment.SegmentEnd = 1 segment.Value = 1 listOfSegments(0) = segment segment = SynthesisAPI.ProfileSegment segment.SegmentEnd = 3 segment.Value = "T+2" listOfSegments(1) = segment myResource.SetSegments listOfSegments myRepository Repository myRepository.ConnectToAccessRepository myRepository.Project.SetCurrentProject (1) myRepository.profile.AddProfile(myResource)

VB.NET myResource SynthesisAPI.cProfile myResource.ProfileType = SynthesisAPI.ProfileTypeEnum.Stress myResource.IsCyclical = True listOfSegments SynthesisAPI.ProfileSegment = _ { SynthesisAPI.ProfileSegment {.SegmentEnd = 1, .Value = 1}, _ SynthesisAPI.ProfileSegment {.SegmentEnd = 3, .Value = }} myResource.SetSegments(listOfSegments) myRepository SynthesisAPI.Repository myRepository.ConnectToAccessRepository myRepository.Project.SetCurrentProject(1) myRepository.Profile.AddProfile(myResource)