Repository.Control.AddXfmeaControl: Difference between revisions
Jump to navigation
Jump to search
Alex Ulanov (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{Template: | {{Template:API}}{{Template:APIBreadcrumb|10|.[[Repository Class|Repository]]}} | ||
Parameters | <onlyinclude>Saves a new [[CXfmeaControl Class|cXfmeaControl]] object to the current project. Returns a '''Boolean''' value; when true, indicates a successful save.</onlyinclude> | ||
:control | |||
== Syntax == | |||
'''.Control.AddXfmeaControl'''(''control'') | |||
=== Parameters === | |||
''control'' | |||
:The [[CXfmeaControl Class|cXfmeaControl]] object to be added. (Required) | |||
== Example == | |||
This example creates a new Xfmea control resource, and then saves it in the first available project in a Synthesis repository. | |||
'''VBA''' | |||
{{APIComment|'Add code to connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
{{APIComment|...}} | |||
{{APIComment|'Create a new control. The following example creates a control named "MyNewControl."}} | |||
{{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl | |||
NewControl.Name = {{APIString|"MyNewControl"}} | |||
{{APIComment|'Add the new control to project #1. The control will be visible in the Synthesis repository upon refresh.}} | |||
MyRepository.Project.SetCurrentProject(1) | |||
{{APIPrefix|Call}} MyRepository.Control.AddXfmeaControl(NewControl) | |||
'''VB.NET''' | |||
{{APIComment|'Add code to connect to a Synthesis repository.}} | |||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | |||
{{APIComment|...}} | |||
{{APIComment|'Create a new control. The following example creates a control named "MyNewControl."}} | |||
{{APIPrefix|Dim}} NewControl {{APIPrefix|As New}} cXfmeaControl ({{APIString|"MyNewControl"}}) | |||
{{APIComment|'Add the new control to project #1. The control will be visible in the Synthesis repository upon refresh.}} | |||
MyRepository.Project.SetCurrentProject(1) | |||
MyRepository.Control.AddXfmeaControl(NewControl) |
Revision as of 18:39, 21 July 2015
Member of: SynthesisAPI10.Repository
Saves a new cXfmeaControl object to the current project. Returns a Boolean value; when true, indicates a successful save.
Syntax
.Control.AddXfmeaControl(control)
Parameters
control
- The cXfmeaControl object to be added. (Required)
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 named "MyNewControl." Dim NewControl As New cXfmeaControl NewControl.Name = "MyNewControl" 'Add the new control to project #1. The control will be visible in the Synthesis repository upon refresh. 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 named "MyNewControl." Dim NewControl As New cXfmeaControl ("MyNewControl") 'Add the new control to project #1. The control will be visible in the Synthesis repository upon refresh. MyRepository.Project.SetCurrentProject(1) MyRepository.Control.AddXfmeaControl(NewControl)