Message 1 of 3
How to test the marking menu ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I need to modify the marking menu, but only if a given command is already in it. So I need to test if this command exist in the marking menu. The problem is that the command exist or not, for inventor it always exist ! Here the code I use to test it :
Private Sub oUserInputEvents_OnLinearMarkingMenu( _
ByVal SelectedEntities As ObjectsEnumerator, _
ByVal SelectionDevice As SelectionDeviceEnum, _
ByVal LinearMenu As CommandControls, _
ByVal AdditionalInfo As NameValueMap)
'
dim test as boolean
'Test on an existing command
test = LinearMenu.item("Delete") Is Nothing
'Test on a non-existing command
test = LinearMenu.item("Deletesdfgdsfg") Is Nothing
'
End Sub
In both cases, Test = false
What's wrong ?