Message 1 of 4
API Refresh vault status for all open documents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
After checking a part out & into vault programmatically , the vault status in the vault status panel still shows "checked out" for the part as well as open assemblies the part resides in, until the status is refreshed in all these documents. The following code executes a vault refresh command on the active document and then activates all the open documents and should refresh their vault status trees as well, however only the status of the initial active document is refreshed, any thoughts?
Dim pDoc As Document Dim originalDocument As String = g_inventorApplication.ActiveDocument.DisplayName 'remember the document from which the program was run Dim ctrDef As ControlDefinition = g_inventorApplication.CommandManager.ControlDefinitions.Item("VaultRefresh") ctrDef.Execute() For Each pDoc In g_inventorApplication.Documents.VisibleDocuments 'activate each open document If Not pDoc.DisplayName.Contains(originalDocument) Then
pDoc.Activate() ctrDef.Execute() End If Next For Each pDoc In g_inventorApplication.Documents.VisibleDocuments 'activate the original document If pDoc.DisplayName = originalDocument Then
pDoc.Activate() End If Next