Repository.Action.GetAction

Gets the action with the designated ID number and returns it as a cAction object. Returns nothing if the action does not exist or is not in the current project.

Syntax
object.Action.GetAction(ID)

where object is a variable that represents a Repository object.

Example
This example assumes that an action with ID#1 exists in a repository. VBA MyRepository Repository MyAction cAction MyRepository.Project.SetCurrentProject(1) MyAction = MyRepository.Action.GetAction(1) ActionName String ActionID Integer ActionName = MyAction.ActionDescription ActionID = MyAction.ID MsgBox ( & ActionID & ", " & ActionName)

VB.NET MyRepository Repository MyAction cAction MyRepository.Project.SetCurrentProject(1) MyAction = MyRepository.Action.GetAction(1) ActionName String ActionID Integer ActionName = MyAction.ActionDescription ActionID = MyAction.ID MsgBox ( & ActionID & ", " & ActionName)