Repository.Xfmea.AddXfmeaEffect Method: Difference between revisions
Jump to navigation
Jump to search
Kate Racaza (talk | contribs) No edit summary |
Kate Racaza (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Template:API}}{{Template:APIBreadcrumb | {{Template:API}}{{Template:APIBreadcrumb|.[[Repository Class|Repository]]}} | ||
Line 9: | Line 9: | ||
===Parameters=== | ===Parameters=== | ||
''Effect'' | ''Effect'' | ||
:Required. The [[XfmeaEffect Class|XfmeaEffect]] object to be added. | :Required. The [[XfmeaEffect Class|XfmeaEffect]] object that represents the effect to be added. | ||
''FailureID'' | ''FailureID'' | ||
:Required. Integer. The record ID of the failure | :Required. Integer. The record ID of the parent FMEA failure. | ||
Line 19: | Line 19: | ||
'''VBA''' | '''VBA''' | ||
{{APIComment|' | {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}} | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}}) | |||
{{APIComment|'Create a new effect. The following code creates a effect described as "No light, potential injury to user."}} | {{APIComment|'Create a new effect. The following code creates a effect described as "No light, potential injury to user."}} | ||
{{APIPrefix|Dim}} AEffect {{APIPrefix|As New}} XfmeaEffect | |||
AEffect.Dsc = {{APIString|"No light, potential injury to user"}} | |||
{{APIComment|'Add the new effect to failure #1 located in project #1.}} | {{APIComment|'Add the new effect to failure #1 located in project #1.}} | ||
MyRepository.Project.SetCurrentProject(1) | |||
{{APIPrefix|Call}} MyRepository.Xfmea.AddXfmeaEffect(AEffect,1) | |||
'''VB.NET''' | '''VB.NET''' | ||
{{APIComment|' | {{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}} | ||
{{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository | ||
MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}}) | |||
{{APIComment|'Create a new effect. The following code creates a effect described as "No light, potential injury to user."}} | {{APIComment|'Create a new effect. The following code creates a effect described as "No light, potential injury to user."}} | ||
{{APIPrefix|Dim}} AEffect {{APIPrefix|As New}} XfmeaEffect | |||
AEffect.Dsc = {{APIString|"No light, potential injury to user"}} | |||
{{APIComment|'Add the new effect to failure #1 located in project #1.}} | {{APIComment|'Add the new effect to failure #1 located in project #1.}} | ||
MyRepository.Project.SetCurrentProject(1) | |||
MyRepository.Xfmea.AddXfmeaEffect(AEffect,1) |
Latest revision as of 17:51, 9 June 2016
Member of: SynthesisAPI.Repository
Adds a new effect to a failure. Returns a Boolean value; when true, indicates a successful save.
Syntax
.Xfmea.AddXfmeaEffect(Effect, FailureID)
Parameters
Effect
- Required. The XfmeaEffect object that represents the effect to be added.
FailureID
- Required. Integer. The record ID of the parent FMEA failure.
Example
This example assumes that FMEAs exist in a repository. It creates a new effect, and then saves it to one of the failures in the repository.
VBA 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") 'Create a new effect. The following code creates a effect described as "No light, potential injury to user." Dim AEffect As New XfmeaEffect AEffect.Dsc = "No light, potential injury to user" 'Add the new effect to failure #1 located in project #1. MyRepository.Project.SetCurrentProject(1) Call MyRepository.Xfmea.AddXfmeaEffect(AEffect,1)
VB.NET 'Declare a new Repository object and connect to a Synthesis repository. Dim MyRepository As New Repository MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10") 'Create a new effect. The following code creates a effect described as "No light, potential injury to user." Dim AEffect As New XfmeaEffect AEffect.Dsc = "No light, potential injury to user" 'Add the new effect to failure #1 located in project #1. MyRepository.Project.SetCurrentProject(1) MyRepository.Xfmea.AddXfmeaEffect(AEffect,1)