AnsweredAssumed Answered

PDM add variable while add file to vault

Question asked by Pichaiyan Prabaharan on Mar 1, 2019
Latest reply on Mar 3, 2019 by Amen Allah Jlili


I try to add a variable to the file when I add file to vault using below codes.


  Select Case poCmd.meCmdType

            Case EdmCmdType.EdmCmd_PostAdd

                MsgBox("File added")

                Dim AffectedFile As EdmCmdData
                For Each AffectedFile In ppoData

                    Dim FileName As String
                    Dim fileType As String
                    FileName = AffectedFile.mbsStrData1


                    Dim myVault As IEdmVault5 = CType(poCmd.mpoVault, IEdmVault5)
                    Dim myfile As IEdmFile5 = myVault.GetFileFromPath(FileName)
                    Dim myvars As IEdmEnumeratorVariable5
                    myvars = CType(myfile.GetEnumeratorVariable(), IEdmEnumeratorVariable5)

                    fileType = FileName.Substring(FileName.Length - 6)
                    fileType = fileType.ToUpper()
                    Dim Rev_0 As Integer
                    Dim Get_Rev_Latest As Integer
                    Rev_0 = 0

                    If fileType = "SLDPRT" Then
                        MsgBox("Setting rev")
                        myvars.SetVar("Rev_Latest", "@", Rev_0)
                    End If

                Next AffectedFile


its not showing the added value until check in and check out file.

I want to see the values in card immediately once i added file to the vault.

may I know what I'm doing wrong?