Repository.Action.GetFMEAActionLocatorLinkPath: Difference between revisions

From ReliaWiki
Jump to navigation Jump to search
(Created page with '{{Template:API}}{{Template:APIBreadcrumb|.Repository}} <onlyinclude>Creates a locator link file for the action and returns the path to the file.</onlyinclu…')
 
No edit summary
Line 5: Line 5:


== Syntax ==
== Syntax ==
  '''.Action.GetFMEAActionLocatorLinkPath'''(''actionID'', ''[causeID]'')
  '''.Action.GetFMEAActionLocatorLinkPath'''(''actionID'', ''[causeID]'') {{APIPrefix|As}} String


=== Parameters ===
=== Parameters ===
Line 17: Line 17:


  '''VBA'''
  '''VBA'''
{{APIComment|'Declare a new Repository object and connect to a Synthesis repository.}}
  {{APIPrefix|Dim}} MyRepository {{APIPrefix|As New}} Repository
  MyRepository.ConnectToAccessRepository({{APIString|"C:\RSRepository1.rsr10"}})
 
{{APIComment|'Get action #1 from project #1.}}
  {{APIPrefix|Dim}} MyAction {{APIPrefix|As}} cAction
  MyRepository.Project.SetCurrentProject(1)
  {{APIPrefix|Set}} MyAction = MyRepository.Action.GetAction(1)
{{APIComment|'Get string which contains the path to the action}}
  {{APIPrefix|Dim}} sPath {{APIPrefix|As}} String
  sPath = MyAction.GetFMEAActionLocatorLinkPath

Revision as of 23:51, 13 March 2019

APIWiki.png


Member of: SynthesisAPI.Repository


Creates a locator link file for the action and returns the path to the file.

Syntax

.Action.GetFMEAActionLocatorLinkPath(actionID, [causeID]) As String

Parameters

actionID

Required. The ID of the action.

causeID

Optional. The ID of the cause that the action belongs to. Set to 0 to use the first cause where the action is used.

Example

VBA

 'Declare a new Repository object and connect to a Synthesis repository. 
  Dim MyRepository As New Repository
  MyRepository.ConnectToAccessRepository("C:\RSRepository1.rsr10")
 
 'Get action #1 from project #1. 
  Dim MyAction As cAction
  MyRepository.Project.SetCurrentProject(1)
  Set MyAction = MyRepository.Action.GetAction(1)
 'Get string which contains the path to the action 
  Dim sPath As String
  sPath = MyAction.GetFMEAActionLocatorLinkPath