Addin file run in revit 2016 but not in 2015

Addin file run in revit 2016 but not in 2015

Anonymous
Not applicable
546 Views
5 Replies
Message 1 of 6

Addin file run in revit 2016 but not in 2015

Anonymous
Not applicable

Hi,

 

I have created an IExternalCommand with a ClassLibrary (PTLGClassLibrary). The class I want to run is called ConfigurateurPTLGClass and use a windows form that is contained in my classlibrary.

 

That's my .addin file :

 

eeeee.JPG

 

When I run it in Revit 2016 it works perfectly

 

When I run in Revit 2015 I have the following error message :

 

"Failed to initialize the add-in "myAddin" because the class "myProject.myClassLibrary" cannot be found in the add-in assembly.

 

The FullClassName provides the entry point for Revit to call the dd-in, you must ensure this class implements the %addintype%."

 

 

 

 

Thanks for your help ! 

 

Sabatierae

0 Likes
547 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable
did u put your addin file in right foler?

better change addin Id if you have different add ins at the same time
0 Likes
Message 3 of 6

Anonymous
Not applicable

Yes, I have placed my addin with my others addins in C:\ProgramData\Autodesk\Revit\Addins\2015 and I have already changed the AddInId

0 Likes
Message 4 of 6

Anonymous
Not applicable

This may be a cro magnon man response, and I apologize if it is, BUT just to make sure..

 

Did you know that if you want to take an addin developed using the 2016 API references, and use that code for 2015, you will need to open the development project and replace the 2016 references with the Revit 2015 library references?

 

To put it  simply, if the addin is for 2015, the references must be dlls from Revit 2015.

2016 for 2016, ad infinitum.

 

The API changes between versions too, so you may have to massage your code a bit when switching versions. Although 2015 and 2016 are usually quite compatible barring fabrication elements. Once you swap out the references, hunt for red squigglies, sort them, and you should be alright.

 

Again, apologies if this was already known to you.

 

Message 5 of 6

jeremytammik
Autodesk
Autodesk

You may be able to run a Revit 2015 add-in in Revit 2016 without recompiling.

 

Vice versa may not work, just as cyanstudios points out.

 

Here is a sample demonstrating running a Revit 2012 add-in in Revit 2013, with some extra bells and whistles:

 

http://thebuildingcoder.typepad.com/blog/2012/07/multi-version-add-in.html

 

Many add-ins will continue running in one or two subsequent versions of Revit, if none of the API functionality that they make use of is changed under the hood.

 

You can only tell by trying it out, though.

 

The safest path is always to recompile for each new major release.

 

That is also the one and only recommended and officially supported way to go.

 

Cheers,

 

Jeremy



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

Message 6 of 6

Anonymous
Not applicable

Thanks for your answers, 

 

What I don't understand is that this addin has been developped with references for revit 2015 as shown in the screenshot.

 

ref.JPG

 

thx for your help

0 Likes