Build addins for previous versions Revit that are not installed on dev machine?

Build addins for previous versions Revit that are not installed on dev machine?

ArmandD
Enthusiast Enthusiast
1,291 Views
7 Replies
Message 1 of 8

Build addins for previous versions Revit that are not installed on dev machine?

ArmandD
Enthusiast
Enthusiast

Is there a way to still be able to compile addins for older versions of Revit that I no longer have installed?  I have addins that I have written and still would like to support for Revit 17, 18, 19, & 20.  I only want to keep Revit 19 & 20 installed on my development machine.  Is there a procedure for still having access to the required Revit dll's so that my applications can still be compiled?

0 Likes
Accepted solutions (1)
1,292 Views
7 Replies
Replies (7)
Message 2 of 8

Moustafa_K
Collaborator
Collaborator

it is possible but you will risk the test.

basically you need to have a copy of RevitAPI.dll and RevitUI.dll, (there are others dll, ofcourse,  optional but depends on your code requirements), for each respectable version.

and then you can link them to you add them to references in your project.

 

I hope that helps

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes
Message 3 of 8

ArmandD
Enthusiast
Enthusiast
If I am using a new development machine, how do I get the older dll files and where do you put them (folder/path)?
0 Likes
Message 4 of 8

Moustafa_K
Collaborator
Collaborator

you need to get those files from any machine that already installed Old Revit versions.

and just keep them anywhere in your Project library folder for example. 

I wonder how you originally added your Revit lib for the current version?!!  it should be the same.

not sure if i understand you correctly.

 

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
0 Likes
Message 5 of 8

MarryTookMyCoffe
Collaborator
Collaborator

I don't thing it will work. I remember that I try in past build app only on dll with out revit and there was tons errors with dll connections. I personally have all reivits from 2017, can't you download older version from user panel?
I still have access for version from 2017.
If you will be able to do this on only dll, let us know.

-------------------------------------------------------------
--------------------------------|\/\/|------------------------
do not worry it only gonna take Autodesk 5 years to fix bug
0 Likes
Message 6 of 8

ArmandD
Enthusiast
Enthusiast
The only version that are available for download (at my Autodesk account) are the current version and the previous 3 versions. Revit 2020, 2019, 2018, & 2017. I was hoping there was a way to continue compiling code for versions without having to install the programs.
0 Likes
Message 7 of 8

Moustafa_K
Collaborator
Collaborator

well, this how i got it working, but this was during my app production, not sure the same applies to you but you may try

  1. Compile your code with any available version you have
  2. go to the output folder ( the folder where your code is compiled and copied to: for instance lets say /Bin/Debug/ )
  3. in this output folder, you will find a mixture between your project dll file, All Revit dll Files, and your libraries files.
  4. to be able to identify which are revit files, 
    1. open the output folder in Explorerfolder filter.PNG
    2. right click on the column header and select more
      from the list menu look for Company, and check them
    3. in my case I found 2 filter criteria Companyselect company.PNG
    4. by then I realized I have all these DLLs required due to my Code
    5. AddInManager.dll
      AdWindows.dll
      AnalysisAppsDBAPI.dll
      APIDBAPI.dll
      APIInterop.dll
      APIUIAPI.dll
      ArrayElemsDBAPI.dll
      AssemblyDBAPI.dll
      BuildingSystemsDBAPI.dll
      BuildingSystemsUIAPI.dll
      CurtainGridFamilyDBAPI.dll
      DBManagedServices.dll
      DesktopMFCAPI.dll
      DetailDBAPI.dll
      DetailUIAPI.dll
      DPartDBAPI.dll
      ElementGroupDBAPI.dll
      EnergyAnalysisDBAPI.dll
      EnergyAnalysisUtilitiesAPI.dll
      EssentialsDBAPI.dll
      EssentialsUIAPI.dll
      FamilyDBAPI.dll
      GeomUtilAPI.dll
      GraphicsAPI.dll
      HostObjDBAPI.dll
      InterfaceAPI.dll
      InterfaceUtilAPI.dll
      ManagedMC3.dll
      MassingDBAPI.dll
      NumberingDBAPI.dll
      PointCloudAccessAPI.dll
      RebarDBAPI.dll
      RevitAddInUtility.dll
      RevitAPI.dll
      RevitAPIFoundation.dll
      RevitAPIUI.dll
      RevitDBAPI.dll
      RevitMFCAPI.dll
      RevitUIAPI.dll
      RoomAreaPlanDBAPI.dll
      SculptingDBAPI.dll
      SiteDBAPI.dll
      StairRampDBAPI.dll
      StructuralAnalysisDBAPI.dll
      StructuralDBAPI.dll
      UIFramework.dll
      UIFrameworkServices.dll
      UtilityAPI.dll
    6. I made a copy of those to my library from Each Revit version. 
    7. and then code compiled perfectly.
  5. but now the challenge is to find an already installed old version to copy those files to your lib.

hope this helps

Moustafa Khalil
Cropped-Sharp-Bim-500x125-Autodesk-1
Message 8 of 8

jeremytammik
Autodesk
Autodesk
Accepted solution

Thank you for all the helpful answers, guys.

 

I'll add what I already answered Armand on his question to The Building Coder:

 

https://thebuildingcoder.typepad.com/blog/2018/06/multi-targeting-revit-versions-cad-terms-texture-m...

 

Question: Is it possible to write/compile Revit addins without having the specific version of Revit installed on your development machine? I am currently supporting addins that I have written for Revit versions 2016 thru 2020. I am setting up a new development machine and do not want to install 2016, 2017, & 2018. Does this mean I can no longer maintain the code that targeted those versions? Is there a way to just reference copies of those specific dll files?

 

Answer: I have good news for you.

 

You do not need to install Revit on your development machine.

 

All you need are the Revit API .NET assemblies.

 

As a minimum, they include RevitAPI.dll and RevitAPIUI.dll.

 

There are many more that are optional.

 

You can even create a NuGET package to deploy them to your development machine, or possibly use an existing one:

 

https://www.nuget.org/packages?q=revit+api

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder