Hello Xiaodong,
Yes that's it what I want to do.
Georg
Hi Georg,
you just need to iterate the occurrences of assembly document and get which one is dirty, and add them to your browser pane.
The below is a blog on how to create custom browser pane. It shows adding an Inventor document node to the custom pane.
As to iterate occurrences, the code could be:
Sub test()
Dim oDoc As AssemblyDocument
Set oDoc = ThisApplication.ActiveDocument
Dim oAssDef As AssemblyComponentDefinition
Set oAssDef = oDoc.ComponentDefinition
Dim oOcc As ComponentOccurrence
Dim oEachDoc As Document
For Each oOcc In oAssDef.Occurrences
Set oEachDoc = oOcc.Definition.Document
If oEachDoc.Dirty = True Then
'Add it to your browser pane
End If
Next
End Sub
Hello Xiaodong,
the problem is not to loop through the assembly and find the dirty files. But how could I add them to the browserpane or change the icon from files which are dirty?
Thank you Georg
Hi Georg,
may I know whether you have taken a look at that blog link I posted in the last message? it exactly shows how to add a document to the custom browser pane.
As to change the icon of the browser node, please refer to the two blogs below. Although it is talking about client feature, it is similar to change the icon. i.e. the core codes are:
‘create the resource of icon. assume a bitmap 1.bmp exists ‘ in c:\temp
Dim oCnr As ClientNodeResource
Dim oIcon As IPictureDisp
Set oIcon = stdole.LoadPicture("C:\temp\1.bmp")
' Create a client node resource.
Set oCnr = oDoc.BrowserPanes.ClientNodeResources.Add("SamplePocketFeature", -1, oIcon)
' Override the icon for the client feature.
oNode.BrowserNodeDefinition.OverrideIcon = oCnr
http://adndevblog.typepad.com/manufacturing/2012/08/change-the-browser-node-icon.html