You need to read the API Help for the EdmCmdData Structure.
You will see that you get passed different data for each type of event that your addin handles.
For OnTaskRun, mpoExtra points to the Task rather than a file.
mlObjectID1 will be the ID of the file, so you need to get the IEdmFile5 object from that, and then you can set vars equal to that.
Hi Simon -
Thanks for the pointers, that is exactly what I needed! Here's what I ended up with (Revision and Status are read from the file card):
Dim FileID As Integer
Dim info As EdmCmdData
info = ppoData(0)
FileID = info.mlObjectID1 'Selected files ID
Dim vault As IEdmVault5
vault = poCmd.mpoVault
Dim FileObject As IEdmFile5
FileObject = vault.GetObject(EdmObjectType.EdmObject_File, FileID)
Dim vars As IEdmEnumeratorVariable8
vars = FileObject.GetEnumeratorVariable
Dim Revision As String = Nothing
Dim Status As String = Nothing
vars.GetVar("Revision", "", Revision)
vars.GetVar("Status", "", Status)
Thanks for the help!