11-05-2024
10:02 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
11-05-2024
10:02 PM
Awesome, that's it!
And it even works with the ButtonDefinition ![]()
// disable new button in all environments except drawings
foreach (Inventor.Environment oTempEnv in Plugin.m_inventorApplication.UserInterfaceManager.Environments)
{
if (oTempEnv.InternalName != "DLxDrawingEnvironment")
{
try
{
//ControlDefinition myDrawingCommand = Plugin.m_ConDefs[InternalName];
//oTempEnv.DisabledCommandList.Add(myDrawingCommand);
oTempEnv.DisabledCommandList.Add((ControlDefinition)Btn.ButtonDefinition);
}
catch
{
}
}
}