Dear Kudzuman,
Thank you for your update.
Yes, exactly. Good idea.
Everything you say and surmise is confirmed by the development team.
I heard back from them already, and they say:
IsModelInCloud was implemented as 'public_api’ by mistake and changed to 'public_api_internal’ since 11/27/2013.
It is unfortunate that you were able to use it.
It does not belong to the officially published API, even it was temporarily visible by mistake at that time.
Sorry about that!
So how to identify whether a model is a file-based work-shared model or hosted by Collaboration for Revit or Revit Server?
So far, there is no exposed API for this.
We may expose one in the future.
Here is a workaround that you can try out:
- Get central ModelPath of the document;
- Convert ModelPath to a user visible path using 'ModelPathUtils::ConvertModelPathToUserVisiblePath(ModelPath &)'
- Decide based on the user visible path as follows:
- Is it a unc path such as \\shareServer\central.rvt or c:\my document\central.rvt?
- If not:
- Starting with RSN://, it is a Revit server model
- Starting with A360://, it is a Collaboration for Revit model
The A360 prefix may be changed to BIM 360 at some point.
As always, when making use of workaround, you should use at your own risk and include regular (daily) unit tests in your development process to verify that this approach really does work under all circumstances that you encounter and care about.
I hope this helps.
Please do let us know whether this solved the issue for you, preferrably including a sample code snippet.
Thank you!
Best regards,
Jeremy