Repository.Control.GetXfmeaControl: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) mNo edit summary |
Kate Racaza (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
Revision as of 22:14, 13 November 2015
Member of: SynthesisAPI.Repository
Gets the Xfmea control with the designated ID number and returns it as a cXfmeaControl object. Returns nothing if the control does not exist or is not in the current project.
Syntax
.Control.GetXfmeaControl(ID)
Parameters
ID
- Integer. The ID number of the control to retrieve.
Example
This example assumes that an Xfmea control with ID#1 exists in a repository.
VBA 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Get control #1 from project #1. Dim MyControl As cXfmeaControl MyRepository.Project.SetCurrentProject(1) Set MyControl = MyRepository.Control.GetXfmeaControl(1) 'Output sample: Display the name and ID of the control. Dim ControlName As String Dim ControlID As Integer ControlName = MyControl.Name ControlID = MyControl.ID MsgBox ("ID# " & ControlID & ", " & ControlName)
VB.NET 'Add code to connect to a Synthesis repository. Dim MyRepository As New Repository ... 'Get control #1 from project #1. Dim MyControl As cXfmeaControl MyRepository.Project.SetCurrentProject(1) MyControl = MyRepository.Control.GetXfmeaControl(1) 'Output sample: Display the name and ID of the control. Dim ControlName As String Dim ControlID As Integer ControlName = MyControl.Name ControlID = MyControl.ID MsgBox ("ID# " & ControlID & ", " & ControlName)