Revit API sample code error.

Revit API sample code error.

bwang-tecoustics
Collaborator Collaborator
725 Views
2 Replies
Message 1 of 3

Revit API sample code error.

bwang-tecoustics
Collaborator
Collaborator

Hi, I'm new to Revit API but familiar with Inventor API. I opened a file from "Revit 2018.1 SDK" sample files and added reference to the Revit 2018 API DLLs. It showed everything ok after I added the reference. But when I tried to compile it, it showed me all the errors. Anyone can help?

 

RevitError02.png

0 Likes
Accepted solutions (1)
726 Views
2 Replies
Replies (2)
Message 2 of 3

bwang-tecoustics
Collaborator
Collaborator

After I change the reference to Revit 2016 DLLs, the problem is solved. Just don't know why the code from Revit 2018 SDK is not working with 2018 DLLs. Or there is something wrong with my computer setup?

0 Likes
Message 3 of 3

aignatovich
Advisor
Advisor
Accepted solution

Hi!

 

Addins for Revit 2016 must be compiled with .Net 4.5 or higher, Addins for Revit 2018 must be compiled at least with .Net 4.5.2

0 Likes