rhino.inside-revit icon indicating copy to clipboard operation
rhino.inside-revit copied to clipboard

Rhino.Inside for Revit 2017

Open alexberd opened this issue 4 years ago • 1 comments

I noticed that the official release of Rhino Inside version of Jan 2021 does not support Revit 2017. Could you please advise if it is possible to build Rhino.Inside-Revit for Revit 2017? Thank you in advance. Alex

alexberd avatar Jan 21 '21 19:01 alexberd

@alexberd Hello! Revit 2017 API is quite old and keeping RIR buildable on 2017 was a growing pain. Knowing that the current supported Revit versions by Autodesk is 2018-2021, we dropped the support for 2017.

I'm not sure if you are comfortable forking the project and building it for 2017 yourself. There are two things need to happen. First you'd need to add build configurations to the Visual Studio solution, and second, take care of the build errors if there are any:

If you are and would like to support the 2017 development on this project:

  • Please fork the project to your github account. Then clone the forked repo on your machine
  • Switch to wip branch (this is where we have removed the 2017)
  • Create a branch here for adding 2017 (e.g.dev/2017support)
  • Take a look at this commit that removes the 2017 configurations and add the configs back
  • Build for 2017 and take a look at build errors
  • Fix the code to remove the build errors, commit them to your branch
  • Then create a pull-request from your branch to the wip branch on the original RIR repo. Github will guide you thru this process.

Lets us know if you need more info on this process

if you are not, and just want to get RIR to work with 2017 right now:

  • Clone the project and stay on the master branch. This branch still has the 2017 build configs from before
  • Open the project in visual studio
  • Switch the build target to "Release 2017" from the top toolbar
  • Right click on the solution and click on "Restore Nuget Packages"
  • Then build for 2017
  • On a successful build, you will have 3 binaries (RhinoInside.Revit.dll, RhinoInside.Revit.GH.gha, and RhinoInside.Revit.Native.dll inside the bin/ directory of each respective project.
  • You'd then need to go inside 2017 Addin folder (%APPDATA%/Autodesk/Revit/Addins/2017/) and create a manifest file that points to where the compiled RIR binaries are. On the next step we will place them next to this manifest file. The manifest file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<RevitAddIns>
  <AddIn Type="Application">
    <Name>Rhino.Inside</Name>
    <Assembly>RhinoInside.Revit\RhinoInside.Revit.dll</Assembly>
    <FullClassName>RhinoInside.Revit.Addin</FullClassName>
    <AddInId>02EFF7F0-4921-4FD3-91F6-A87B6BA9BF74</AddInId>
    <VendorId>com.mcneel</VendorId>
    <VendorDescription>Robert McNeel &amp; Associates</VendorDescription>
    <AllowLoadingIntoExistingSession>false</AllowLoadingIntoExistingSession>
  </AddIn>
</RevitAddIns>

Make another folder under this directory named RhinoInside.Revit and copy the files shown here from the compiled dlls into this directory Screen Shot 2021-02-01 at 12 02 10 PM

Please continue the discussion and feel free to ask questions. We'd like to keep this thread as a guide for other potential 2017 users as well

eirannejad avatar Feb 01 '21 20:02 eirannejad