Revit 2019.1 API breaking change

Revit 2019.1 API breaking change

ollikat
Collaborator Collaborator
2,033 Views
3 Replies
Message 1 of 4

Revit 2019.1 API breaking change

ollikat
Collaborator
Collaborator

Hello all Revit API folks!

We have encountered a very unfortunate issue with Revit 2019.1. It is related to Document.GetWorksharingCentralModelPath() method.

Previously the documentation says this:
"The central model path, or null if the document is not workshared."

After the 2019.1 update, it seems that it will throw an exception:
InvalidOperationException: Additional information: This Document is not a workshared document.

What we would like to have ASAP is a full and detailed documentation of the API changes. Is there a new .chm somewhere? Will there be? Secondly, what other significant changes there might be in the API?

Accepted solutions (1)
2,034 Views
3 Replies
Replies (3)
Message 2 of 4

zhong_wu
Autodesk Support
Autodesk Support
Accepted solution

Firstly, answer your question about the doc of What's new in 2019.1, Yes, the new help doc of RevitAPI.chm which is under the folder of Revit 2019.1 SDK installation includes all the main API update for the version 2019.1, please check that file for all the details. Jeremy will also prepare a blog about the information on http://thebuildingcoder.typepad.com/blog/ as usual, please pay attention to that.

 

Second, for your specific question about throwing exception in Document.GetWorksharingCentralModelPath() when it's not workshared model, unfortunately, it's not listed in the What's New of 2019.1 API Doc, but I confirmed with our Revit developer. Yes, that's what they did intentionally, the reason is because Revit cloud model is a non-workshared model from user's perspective, so Revit will throw exceptions for existing worksharing related methods on a Revit cloud model.      


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes
Message 3 of 4

ollikat
Collaborator
Collaborator

Thank you for yor quick reply! I think I need a minor clarification here:

 

@zhong_wu wrote: which is under the folder of Revit 2019.1 SDK installation

 

Is this somewhere if I have installed the update using Autodesk Desctop App?  If I have a fresh Revit installation, I would know exactly where's the SDK is located, but know I can't figure it out...

0 Likes
Message 4 of 4

zhong_wu
Autodesk Support
Autodesk Support

This is the msi installation of Revit SDK, usually you can download it under Tools section of Revit Developer Centre(2019.1 is still on the way, please wait), since you have Revit SDK 2019.1 already, it must be installed somewhere on your PC, usually, it will be installed under C:\Revit 2019.1 SDK of RevitAPI.chm as shown in the screenshot below:

 Screen Shot 2018-08-17 at 6.17.35 PM.png

 


John Wu
Developer Technical Services
Autodesk Developer Network


0 Likes