speckleworks / SpeckleRevit

Archived, dev moved to https://github.com/speckleworks/SpeckleRevitReboot
MIT License
17 stars 7 forks source link

Best practices for Revit Addin #2

Open fraguada opened 6 years ago

fraguada commented 6 years ago

Please advise on the proper way to set up a Revit Addin. For example:

radumg commented 6 years ago

How to best integrate into the Add-In Ribbon?

Depending on permissions to copy data to that folder, an installer might be required.

radumg commented 6 years ago

@fraguada , i can extract a pretty good/clear boilerplate & utils from our current Revit tools for the Ribbon creation and post-build steps so the addin is installed on build

archinate commented 6 years ago

@fraguada I have a good Revit VS template setup for this that I can provide. The Ribbon/icons, etc are registered through the ExternalApplication when Revit starts up. ExternalCommands are fired through the ribbon buttons. It may be good to wireframe out the Speckle-Revit interaction a bit. I use Dockable windows for many of our apps which requires some special setup but I could see them being very useful for Speckle

fraguada commented 6 years ago

@radumg really helpful information! At the moment I have this under 'External Tools' in the Add-In ribbon. I didn't get so far as to googling how to make a button yet. Also good to know particularities related to addin distribution.

@archinate That would be very helpful. I just cobbled this together from a few sources on the web. Literally my first Revit addin.

It may be good to wireframe out the Speckle-Revit interaction a bit.

Agreed. You can see how this works in Rhino in the Interop.cs class and in the SpeckleRhinoReceiver.cs / SpeckleRhinoSender.cs. As well as the components in SpeckleView.

I use Dockable windows for many of our apps which requires some special setup but I could see them being very useful for Speckle

100% agree!

radumg commented 6 years ago

At the moment I have this under 'External Tools' in the Add-In ribbon

If no ribbon/panel is specified, all ExternalCommands end up here, good start.

@archinate if you'd like to share the VS template, that would be a good starting point, happy to contribute to it with anything else i might have. I generally start from Jeremy's VS template before making project-specific ones.

@fraguada - could we get a slightly more digestible list of things that need to happen with the plugin, in chronological order ? I'm getting a bit lost in that Interop.cs.

fraguada commented 6 years ago

For anything to start working, SpeckleRevitConverter #4 has to be started. Interop deals with the communication between the UI and the plugin. I'll do my best to make this clearer in the coming days.

archinate commented 6 years ago

@fraguada I migrated your stuff to a template Revit project. Nothing fancy. We can wireframe the project a bit. The PR is https://github.com/speckleworks/SpeckleRevit/pull/13

arif-hanif commented 6 years ago

@fraguada @archinate @radumg I would love to join in and help on this project, anyone got a slack channel we can hop in?