Identify File in Workflow Transition

Hello,

What steps need to be taken for an Addin to Identify a file as it travels through a transition in a workflow? I have added Task Properties (Task flag: SupportsStateChange) enabling the Addin to be used during a transition, but I'm not too sure how to use the EdmLib interfaces to specify the file (going through the transition). I attempted to transpose some of the VB code provided in the Programmer's reference guide and got somthing like this (in C#):

IEdmVault5 vault = (IEdmVault5)emdCmd.mpoVault;

IEdmWorkflow5 Workflow1 = (IEdmWorkflow5)vault;

IEdmState5 GetState = (IEdmState5)Workflow1.GetTransition("Transition Name");

(use IEdmFile5 and link it back to Get state??)

(I'm sure there are problems with the above code) I'm still getting used to API syntax, as I have little experince writing code for other programs.

Thanks

SolidworksSolidworks Pdm enterprise Pdm