Here are a couple of Revit API related updates to take note of:
The Autodesk Developer Network ADN web site at www.autodesk.com/developer-network has been updated.
New ADN Open pages are live now, and all the product- and API-specific URLs are working again.
Make sure to clean your cache when using them.
The ADN page of greatest interest to us here, of course, is the Revit Developer Centre at www.autodesk.com/developrevit.
Check it out in its new guise.
I took this opportunity to migrate the ADN Revit API training labs to Revit 2018.
I also finally eliminated all deprecated API usage warnings from the AdnRevitApiLabsXtra.
The last one to go was the deprecated usage of the
Autodesk.Revit.Creation.Document NewTag
method,
replaced by IndependentTag
Create
.
Here are two code snippets from the relevant commit to the GitHub repository
to eliminate deprecated API usage of the creation document NewTag
method for
C# and VB:
C# for Revit 2017 API:
IndependentTag tag = createDoc.NewTag( view, inst, false, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, midpoint ); // 2017
C# for Revit 2018 API:
IndependentTag tag = IndependentTag.Create( doc, view.Id, new Reference( inst ), false, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, midpoint ); // 2018
VB for Revit 2017 API:
Dim tag As IndependentTag = createDoc.NewTag( view, inst, False, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, midpoint) ' 2017
VB for Revit 2018 API:
Dim tag As IndependentTag = IndependentTag.Create( doc, view.Id, New Reference(inst), False, TagMode.TM_ADDBY_CATEGORY, TagOrientation.Horizontal, midpoint) ' 2018
You should get your code ready for upcoming future versions as well.
Eliminating all warning messages is a fool-proof no-brainer first step to get started with that.
I reached a new record score of 41 (as far as I know) as top solution author in the Revit API discussion forum:
I very much enjoy watching your scores rise, too, guys!