Repository.Control.AddXfmeaControl: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 21: Line 21:
   
   
   
   
  {{APIComment|'Create a new control. The following example creates a control named "MyNewControl."}}
  {{APIComment|'Create a new control. The following example creates a control with the description "MyNewControl."}}
   {{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl
   {{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl
   NewControl.Name = {{APIString|"MyNewControl"}}
   NewControl.ControlDescription = {{APIString|"MyNewControl"}}
   
   
  {{APIComment|'Add the new control to project #1.}}
  {{APIComment|'Add the new control to project #1.}}
Line 36: Line 36:
   
   
   
   
  {{APIComment|'Create a new control. The following example creates a control named "MyNewControl."}}
  {{APIComment|'Create a new control. The following example creates a control with the description "MyNewControl."}}
   {{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl ({{APIString|"MyNewControl"}})
   {{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl ({{APIString|"MyNewControl"}})
   
   

Revision as of 17:37, 11 September 2015

APIWiki.png


Member of: SynthesisAPI10.Repository


Adds a new Xfmea control to a Synthesis repository. Returns a Boolean value; when true, indicates a successful save.

Syntax

.Control.AddXfmeaControl(control)

Parameters

control

Required. The cXfmeaControl object to be added.


Example

This example creates a new Xfmea control resource, and then saves it in the first available project in a Synthesis repository.

VBA

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 


 'Create a new control. The following example creates a control with the description "MyNewControl." 
 Dim NewControl As New cXfmeaControl
 NewControl.ControlDescription = "MyNewControl"

 'Add the new control to project #1. 
 MyRepository.Project.SetCurrentProject(1)   
 Call MyRepository.Control.AddXfmeaControl(NewControl)
VB.NET

 'Add code to connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  ... 


 'Create a new control. The following example creates a control with the description "MyNewControl." 
 Dim NewControl As New cXfmeaControl ("MyNewControl")

 'Add the new control to project #1. 
 MyRepository.Project.SetCurrentProject(1)   
 MyRepository.Control.AddXfmeaControl(NewControl)