Talk:Repository.Action.GetAllActions/Notes

From ReliaWiki
Revision as of 17:11, 13 January 2016 by Kate Racaza (talk | contribs) (Created page with '<onlyinclude>Gets a list of actions associated with a project. Returns a '''cAction''' object array that contains the actions in that project.</onlyinclude> …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Gets a list of actions associated with a project. Returns a cAction object array that contains the actions in that project.

Syntax

.Action.GetAllActions(Filter)

Parameters

Filter

Optional. A filter that returns a particular type of action resource (e.g., global only, local and global only, etc.). Can be any ResourceFilterEnum constant. Default value = 0, which returns local actions only.


Example

This example assumes that actions exist in the first available project of a repository.

VBA|VB.NET

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

 
 'Get a list of all local actions in project #1. 
 Dim ListofActions() As cAction
 MyRepository.Project.SetCurrentProject (1)  
 ListofActions = MyRepository.Action.GetAllActions()

 'Output sample: Display the number of elements in the array. 
 Dim NumberofElements As Integer
 NumberofElements = UBound(ListofActions) - LBound(ListofActions) + 1
 MsgBox (NumberofElements)