I tried it like you said, without command_class, but nothing happens when I click on my invokebutton.
If I see it correctly, there are several commands in one dll.
In the Addin ModPlus there are various tools under Utils which are summarized in the mprTools_2021.dll.
Part of Find All Loaded Assemblies for mprTools_2021.dll:
mprTools_2021 2.19.3.0 C:\Users\faust\AppData\Roaming\ModPlus\Functions\Revit\mprTools\mprTools_2021.dll
External Applications:
External Commands:
[‘mprTools.Commands.CategoryShow’, ‘mprTools.Commands.WallsShow’, ‘mprTools.Commands.WindowsShow’, ‘mprTools.Commands.DoorsShow’, ‘mprTools.Commands.TagsShow’, ‘mprTools.Commands.FloorsShow’, ‘mprTools.Commands.ColumnsShow’, ‘mprTools.Commands.GridsShow’, ‘mprTools.Commands.LevelsShow’, ‘mprTools.Commands.RampsShow’, ‘mprTools.Commands.StairsShow’, ‘mprTools.Commands.StairsRailingShow’, ‘mprTools.Commands.RoofsShow’, ‘mprTools.Commands.CeilingsShow’, ‘mprTools.Commands.ElevationsShow’, ‘mprTools.Commands.SectionsShow’, ‘mprTools.Commands.ComponentsShow’, ‘mprTools.Commands.GenericModelsShow’, ‘mprTools.Commands.ReferencePlanesShow’, ‘mprTools.Commands.StructuralFramingShow’, ‘mprTools.Commands.StructuralFoundationShow’, ‘mprTools.Commands.ReinforcementShow’, ‘mprTools.Commands.LinesShow’, ‘mprTools.Commands.MassShow’, ‘mprTools.Commands.AnalyticalShow’, ‘mprTools.Commands.DuctsShow’, ‘mprTools.Commands.FlexDuctsShow’, ‘mprTools.Commands.PipesShow’, ‘mprTools.Commands.WiresShow’, ‘mprTools.Commands.CableTraysShow’, ‘mprTools.Commands.ConduitsShow’, ‘mprTools.Commands.PointCloudsShow’, ‘mprTools.Commands.EquipmentShow’, ‘mprTools.Commands.CategoryHide’, ‘mprTools.Commands.WallsHide’, ‘mprTools.Commands.WindowsHide’, ‘mprTools.Commands.DoorsHide’, ‘mprTools.Commands.TagsHide’, ‘mprTools.Commands.FloorsHide’, ‘mprTools.Commands.ColumnsHide’, ‘mprTools.Commands.GridsHide’, ‘mprTools.Commands.LevelsHide’, ‘mprTools.Commands.RampsHide’, ‘mprTools.Commands.StairsHide’, ‘mprTools.Commands.StairsRailingHide’, ‘mprTools.Commands.RoofsHide’, ‘mprTools.Commands.CeilingsHide’, ‘mprTools.Commands.ElevationsHide’, ‘mprTools.Commands.SectionsHide’, ‘mprTools.Commands.ComponentsHide’, ‘mprTools.Commands.GenericModelsHide’, ‘mprTools.Commands.ReferencePlanesHide’, ‘mprTools.Commands.StructuralFramingHide’, ‘mprTools.Commands.StructuralFoundationHide’, ‘mprTools.Commands.ReinforcementHide’, ‘mprTools.Commands.LinesHide’, ‘mprTools.Commands.MassHide’, ‘mprTools.Commands.AnalyticalHide’, ‘mprTools.Commands.DuctsHide’, ‘mprTools.Commands.FlexDuctsHide’, ‘mprTools.Commands.PipesHide’, ‘mprTools.Commands.WiresHide’, ‘mprTools.Commands.CableTraysHide’, ‘mprTools.Commands.ConduitsHide’, ‘mprTools.Commands.PointCloudsHide’, ‘mprTools.Commands.EquipmentHide’, ‘mprTools.Commands.LinesLengthCommand’, ‘mprTools.Commands.OpenBrowserViewsCommand’, ‘mprTools.Commands.PickAnnotationsCommand’, ‘mprTools.Commands.RebarsWithoutHost’, ‘mprTools.Commands.RemoveDimZeroSegmentsCommand’, ‘mprTools.Commands.RestoreViewsCommand’, ‘mprTools.Commands.ZoomSelectionCommand’, ‘mprTools.Commands.GridsMode.GridsModeCommand’, ‘mprTools.Commands.GridsBubbles.GridsBubblesCommand’, ‘mprTools.Commands.CopingDistance.CopingDistanceCommand’, ‘mprTools.Commands.Brush.CopyGraphicOverridesCommand’, ‘mprTools.Commands.Brush.CopyTypeAndParametersCommand’]
So I thought i need to specify the command_class.
This is my current yaml file:
title: "Open\nviews"
author: ModPlus - Open Views
context: zero-doc
assembly: "C:\\Users\\faust\\AppData\\Roaming\\ModPlus\\Functions\\Revit\\mprTools\\mprTools_2021.dll"
command_class: Commands.OpenBrowserViewsCommand
If I click on my button now, nothing happens again. no error message and no execution of the command.