PDM API checks-in open files without dialog
Posted: Wed Jun 12, 2024 7:11 pm
Hi, I'm working on a program that uses the IEdmBatchUnlock interface to check in a list of files. I've made it a user option to bring up the check-in dialog (ShowDlg method), but have noticed during testing that if I don't use the dialog, the API will check in files even if they are open in SolidWorks. The flags are the same in both cases for the CreateTree and GetFileList methods, and I'm not using Eubtf_SkipOpenFileChecks in the CreateTree flags. Snippet below. I'm fairly new to PDM API, using VB.NET. Any advice on how I can prevent the non-dialog method from checking in open files? Thanks!
Code: Select all
BatchUnlocker.AddSelection(vault, FileList)
BatchUnlocker.CreateTree(Me.Handle.ToInt32(), EdmUnlockBuildTreeFlags.Eubtf_MayUnlock + EdmUnlockBuildTreeFlags.Eubtf_MayUndoLock)
BatchUnlocker.Comment = StrComment
' Use dialog if checkbox on form is enabled >> This will prevent open files from being checked in (desired)
If ChkDialog.Checked Then
BatchUnlocker.ShowDlg(Me.Handle.ToInt32())
End If
BatchUnlocker.GetFileList(EdmUnlockFileListFlag.Euflf_GetUnlocked + EdmUnlockFileListFlag.Euflf_GetUndoLocked + EdmUnlockFileListFlag.Euflf_GetUnprocessed)
BatchUnlocker.UnlockFiles(Me.Handle.ToInt32(), Nothing)