Run a Script with a Ribbon Toolbar Button

I’m trying to deploy a Revit add-in to my firm that would create a toolbar to run productivity tools that have been collected/modified/created from macros and dynamo scripts. I’ve been able to make buttons thanks to @Konrad_K_Sobon 's wonderful archi-lab tutorial, but I haven’t found a method to run scripts. I’ve looked into the Dyno Browser, but I’d rather not install (and manage) another add-in to everyone’s Revit just to get buttons on a toolbar, especially since I don’t think I’d be able to add buttons to an existing ribbon tab.

So I’m wondering if anyone has been able to figure out the missing link? It looks like Dyno’s buttons run the scripts through Dyno browser, but maybe there’s a way make a button run scripts from the Dynamo Player in a similar fashion?

Thanks for all thoughts…

So you want Dynamo Player?

if you manage Dyno browser and link it to a server. it will be managed for everyone

Problem is this: Dyno Tools go into its own tab, my tools go into my tab, but I need all the tools to go into a single tab.

Clipboard03

Other problem is I don’t want Dyno on every machine. Since Dyno has a similar function to the Dynamo Player, I thought a someone might have figured out a similar method that I can fully customize.

Dynamo Player on its own isn’t as user friendly as I need it to be. I need to get as close as I can to an “easy button”.

Can you elaborate?

Yes, running scripts from the player requires several steps, opening the player, navigating to the proper folder, scrolling through a list and finding the proper script based on an abbreviated description before running. All this requires the user to go through several steps to actively seek out specific items when most of them don’t know what they’re looking for.

With a toolbar, I can group icons in a logical order and tell users to push these buttons to perform tasks x, y and z. I can put solutions right in front of them instead of training them on the process of finding solutions to problems they may not be aware they have.

6 Likes

@david.burow this is because you have multiple button files?
or your button file isnt set up correctly… can you post your button file here ?

Also check the path(s) which you selected in Dyno Browser

It’s multiple button files. I have buttons to run non-dynamo add-ins as well as Dyno buttons. If I give them both the same tab name, one of the add-ins fails to load.

Further research has learned me that the Dynamo Player is its own add-in, and you can’t run two add-ins simultaneously. Dyno’s buttons work because it is a Dynamo Player.

I agree with this. In Visual Studio you can create add-ins & “package” them into a Revit Ribbon button. It would be great to do this with Dynamo graphs, so that the naming could be better suited to the tool, thumbnails could be used & grouping could be customized

At my company, we have several departments with different tools. Users are therefore pathed to their own specific Graphs folder on the server, for use with Dynamo Player.

But there are several downsides to this:

  1. Sublists/Sections cannot be created to better sort
  2. Sorting is done alphabetically, forcing us to use odd naming standards, just to get things in order
  3. The use has the ability to open the graphs directly through Dynamo Player (and could therefore potentially edit them) - I would prefer they didn’t have access to this

Dynamo Player is just pathing to a folder with specific graphs. By creating “buttons” in a ribbon menu, the Player could be bypassed all-together

If you have enough scripts that scrolling through a list in Player is an issue then you probably have enough scripts that it’s equally as confusing on a toolbar. As you said, the way around this is to group your buttons together. It’s the same thing with naming your scripts. I originally wanted to have all our scripts split up by discipline/team but that was too much for people jumping around with different scripts, so I agree with you that changing folders is a little more cumbersome than it should be. Because of this, I went back to everything in one (default) folder (so that no one needs to change folders ever) and gave all my scripts a prefix to group them appropriately. I also use a naming convention that groups similar scripts together (and of course scripts that should be run in sequence).

All this is to say that Player will work as well as you want it to. I was super excited when I started using Dyno but I immediately dropped it for Player as it’s just not as easy to maintain as Player. I’m not even sure if Dyno is still being supported.

1 Like

I’m in the same boat as others in the thread - that id like to add Ribbon buttons. Its also the fact that I think people get used to where buttons are and it’s easier to see an icon and know that it’s the tool you want, as opposed to scrolling through a list and reading text.
It would be good to see how you are sorting your Dynamo player scripts @Nick_Boyts.

:clap: Well said @Nick_Boyts! :clap:

The other thing that I’ll add in here is that in many cases the ‘we have too many graphs to organize in textural form’ is a result of there being 2x the number of graphs needed. You don’t need a renumber rooms by spline and a renumber parking stalls by spline and a renumber plantings by spline as one modification to the graph will work with all 3.

Absolutely. I would agree that a well developed toolbar is more efficient than a well developed list. The problem is that I’m not sure if Dyno or an add-in file that runs Dynamo scripts is going to qualify as a “well developed” solution. There are pros and cons to both and if you’re looking at what is available “out of the box” then I would say Player is a more stable solution. It does require a little more front-end work on your part but it’s less hassle in the long run (in my opinion).

3 Likes

We have the most simpler solution for this.

Drag and drop your 3 Dynamo Scripts into our folder to integrate them into your Revit toolbar.

Have a look at Nonica.io !

3 Likes