Message 1 of 2
How to enable/disable add-in commands for appropriate environment(s)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've noticed that Inventor commands will disable themselves if you're not in the appropriate environment. For example, if you place a Parts List in a drawing, then switch to an Assembly and right-click, "Repeat Parts List" in the context menu will be grayed out.
I know how to disable a control definition with its "Enabled" property, and I guess I could handle the environment switch event and enable/disable my commands with that. But is that the right way to do it? Or is there a better way? Such as a way to tell Inventor, "this is a Part command", "this is an Assembly command", etc.?