This is exacly what i'm looking for since a while,
I did not find anything about it yet, just looking again this year...
So for those who did not understand the issue,
We need to enable/disable command menu item based on our custom logic.
The predefined flags like EdmMenu_OnlyFiles, EdmMenu_OnlySingleSelection, EdmMenu_MustHaveSelection are just not enough...
In Solidworks App, there is an update event callback for every command item,
Is something similar exists in EPDM?
Dismiss my previous comment.
ok you can disable/enable command tab in menu.
I'm guessing you are adding command item this way:
'value = instance.AddCommandItem2(Name, Position, HintString, ToolTip, ImageListIndex, CallbackFunction, EnableMethod, UserID, MenuTBOption)
Instead of enablemethod put "EnableEPDM"
Then in UI callbacks add
if (your logic here) = true then
you can post your logic here and i'll put it together
This method apply to Solidworks CAD, not PDM...
Here's the EPDM method to use:
poCmdMgr.AddCmd(1000, My.Resources.Activate, EdmMenuFlags.EdmMenu_HasToolbarButton, My.Resources.ActivateTooltip, My.Resources.ActivateTooltip, 0, 99)
And the Solidworks CAD one you talk about:
cmdGroup.AddCommandItem(My.Resources.MsgTlbSWActivate, -1, My.Resources.MsgTlbSWActivateToolTip, _
My.Resources.MsgTlbSWActivate, 0, "ActivateMenu", "ActivateMenuUpdate", 0)