Get file in prestate case - PDM API

Hi All,

I'm trying to get file(or file full path) when change state. Seems like PDM doesn't has that function in documentation.

Is there any way to do that?

Here is my code,

Case EdmCmdType.EdmCmd_PreState 'Hook the addin to change state...

For Each AffectedFile As EdmCmdData In ppoData

If AffectedFile.mbsStrData2 = "Update Doc" Then
MessageBox.Show("Function Triggered Before State Change!")

Dim Vault As IEdmVault5 = poCmd.mpoVault
Dim Pdm_File_Name As String = AffectedFile.mbsStrData1


Dim Pdm_File As IEdmFile5
Pdm_File = Vault.GetFileFromPath(Pdm_File_Name)

End If

Next AffectedFile

Please help on this.

SolidworksApi/macros