I create some folders i the Vault explorer with code below. My problem is when the folders are createt i have to press the refresh button to get the folders to show up.
can anybody provide a code example on how to trigger the refresh of the Vault Client explorer?
regards.
Kent boettger
Private Sub KBCommandHandler() 'MsgBox("Trykkede KBCommand") Dim MyFolderParent As Folder = mDocSvc.GetFolderByPath("$/MonsunVaultFiler/Ordre") Dim MyFolderName As String MyFolderName = "PROJEKT-ABC" Dim MyFullFolderName As String MyFullFolderName = (MyFolderParent.FullName & "/" & MyFolderName) Try 'Check if the folder exist Dim MyFolderId As Long = mDocSvc.GetFolderByPath(MyFullFolderName).Id If MyFolderId.ToString > 0 Then 'MsgBox("Projekt folder findes allerede") MsgBox("Folder already exist") Exit Try End If Catch ex As Exception 'Check if the folder exist 'MessageBox.Show(ex.ToString(), "Projektfolder findes ikke") Dim MyNewFolder As Folder = mDocSvc.AddFolder(MyFolderName, MyFolderParent.Id, False) Dim MyNewSubFolder0 As Folder = mDocSvc.AddFolder("00-Konfigurator", MyNewFolder.Id, False) MsgBox("Folder was created") End Try End Sub
Solved! Go to Solution.
If your code running as a Vault Client Extension and you Implement the IExtension Interface you can set the Property
ForceRefresh = true from the Context-Object. The Context Object are stored in the
CommandItemEventArgs in the Execute-Event from the CommandItem Object...
Hope this help
Michael
Yes it is running as a vault client extension, I can't figure out how to implement this as you descripe it please help.
here is me command item how do i put in this force refresh option?
regards.
Kent boettger
Dim KBCmdItem AsNewCommandItem("KBCommand", "KB Command") AddHandler KBCmdItem.Execute, AddressOf KBCommandHandler
You must change the Method signatur 'KBCommandHandler' to
Private Sub KBCommandHandler(ByVal s As Object, ByVal e As CommandItemEventArgs)
the you can access over e.Context the Property. Look at the SDK 'Hello World' sample. Note this code is for Vault 2012 i can't say if it has change in recent API versions.