Repository.Profile.UpdateProfile: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}}{{InProgress}} <onlyinclude>Updates the properties of a given profile resource in the current project…')
 
No edit summary
 
Line 1: Line 1:
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}{{InProgress}}
{{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}}





Latest revision as of 23:14, 22 March 2017

APIWiki.png


Member of: SynthesisAPI.Repository


Updates the properties of a given profile resource in the current project. Returns a Boolean value; when true, indicates a successful update.

Syntax

.Profile.UpdateProfile(profile)

Parameters

profile

Required. The cProfile object that represents the profile resource to be updated.


Example

This example assumes that a profile with ID #1 exists in the first available project of a 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 MyProfile As cProfile
  MyRepository.Project.SetCurrentProject(1)  
  Set MyProfile = MyRepository.Profile.GetProfile(1)

 'Change the profile's name to "New_Name." 
  MyProfile.Name = "New_Name"

 'Send the change to the Synthesis repository. 
  Call MyRepository.Profile.UpdateProfile(MyProfile)
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 MyProfile As cProfile
  MyRepository.Project.SetCurrentProject(1)  
  MyProfile = MyRepository.Profile.GetProfile(1)

 'Change the profile's name to "New_Name." 
  MyProfile.Name = "New_Name"

 'Send the change to the Synthesis repository. 
  MyRepository.Profile.UpdateProfile(MyProfile)