Hi everyone
I developed a plug-in for Revit 2014 using Visual Studio .NET 2012. this plug-in runs in revit 2014 without problems.the installer saves the plug-in components in the folder "Program Files\My_Plugin\" and copy two files (.dll and .addin) to the path ..... appdata\roaming\autodesk\revit\addin\2014\. If I copy the files from the path "appdata\roaming\autodesk\revit\addin\2014\" to the folder 2013, my plugin runs without problems in Revit 2013. As running my plug-in only from Revit 2014?
Regards
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
Solved by jeremytammik. Go to Solution.
Dear Marcos Mateo,
Sorry, the end of your message seems garbled to me. Can you please clarify what you mean?
Or rather, maybe I can guess: do you wish your add-in to run only in Revit 2014, and be disabled in all other versions of Revit?
That can be easily achieved.
Simply implement an external application and check the Revit version in the OnStartup method.
If you are not happy with it, you can cancel the loading operation.
Best regards,
Jeremy
Hi jeremy
Thanks, that is what I need. There is an example in Visual Basic NET 2012 to do this?
Sure.
Look at
https://github.com/jeremytammik/AdnRme
More specifically, at the external application implementation:
https://github.com/jeremytammik/AdnRme/blob/master/AdnRme/App.cs
Look at the OnStartup method:
public Result OnStartup( UIControlledApplication a ) { // only create a new ribbon panel in Revit MEP: ProductType pt = a.ControlledApplication.Product; //if( ProductType.MEP == pt ) // 2012 if( ProductType.MEP == pt || ProductType.Revit == pt ) // 2013 { AddRibbonPanel( a ); return Result.Succeeded; } return Result.Cancelled; }
Cheers,
Jeremy