Please find attached the macro & procedure to create a shortcut for switching model & vault tree in Inventor browser pane.
1) Copy below code into any module of Inventor VBA (Press ALT+F11 to go to.)
Sub SwitchVaultModelTree()
Dim oDoc As Document
Set oDoc = ThisApplication.ActiveDocument
Dim oPanes As BrowserPanes
Set oPanes = oDoc.BrowserPanes
If oPanes.ActivePane.Name = "Vault" Then
'oPanes.Item(3).Activate
oPanes.Item("Model").Activate
Else
oPanes.Item("Vault").Activate
End If
If oDoc.Type = kDrawingDocumentObject Then
oPanes.Item("Model").Activate
End If
End Sub
2) In Inventor Select Tools>>Customize & goto keyboard tab & Category "Macro"
3) In the command box, click in the Keys column next to the associated command. Enter the shortcut( i chose num key 3), you can any of these methods:
- Press any single letter or number key (A-Z, 0-9).
- Press any combination of alphanumeric keys.
With above steeps number key 3 shall switch the browser tree.
1 comment:
Hello Sanjay,
Can you provide the macros for iproperties?
Regards,
Ruturaj
Post a Comment