My colleague Gopinath Taget has started supporting the Revit API as well, and we are very happy he is joining our workgroup.
He migrated the ADN Training Labs to Revit 2014, and I cleaned up and documented the results a little.
Just like for the migration of The Building Coder samples, the changes are quite small this time around and the basic procedure is the same, so you should refer back to that post to see how to update the Revit API assembly references and other basic stuff.
Here is a snapshot of the error list once the code already was in a compilable state, which at this point of time reports zero errors and 157 warnings about deprecated API usage.
These are the two main culprits in our code:
- In VB the Curve.EndPoint property is obsolete; in C#, it is represented as Curve.get_EndPoint; use Curve.GetEndPoint instead, for both.
- The NewLineBound method is obsolete; use Line.CreateBound instead.
Some others are:
- Document.Delete(Element) is obsolete; use Delete(ElementId) instead.
- Element.Level is obsolete; use Element.LevelId instead.
Removing occurrences of these main offenders reduced the error list to zero errors and 35 warnings, most of which are complaining about the processor architecture mismatch that I cannot do anything about:
- There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "RevitAPI, Version=2012.0.0.0, Culture=neutral, processorArchitecture=x86", "AMD64"...
So I will leave it at this for the moment to provide you here with the very first version 2014.0.0.0 of the ADN Training Labs for Revit 2014.
If you would like to compare it with the last version for Revit 2013, look at adn_src_2013-02-15.zip, containing the following solutions and projects:
Note that the Revit 2014 version presented above only includes the labs, and the Revit 2014 MEP and Structure lab migration is still pending.