SaveAsCloudModel Method (Guid, Guid, String, String)


Saves current nonworkshared model as a cloud model in BIM 360.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2021

Syntax

C#
public void SaveAsCloudModel(
	Guid accountId,
	Guid projectId,
	string folderId,
	string modelName
)
Visual Basic
Public Sub SaveAsCloudModel ( _
	accountId As Guid, _
	projectId As Guid, _
	folderId As String, _
	modelName As String _
)
Visual C++
public:
void SaveAsCloudModel(
	Guid accountId, 
	Guid projectId, 
	String^ folderId, 
	String^ modelName
)

Parameters

accountId
Type: System Guid
The BIM 360 account Id. You can use one of the following methods to get this Id:
  • If you get the hub Id with Forge Data Management API, remove the prefix "b." of the Id string and convert the rest to a Guid.
  • If you get the account Id with Forge BIM 360 API, just convert the Id string to a Guid.
projectId
Type: System Guid
The BIM 360 project Id. You can use one of the following methods to get this Id:
  • If you get the project Id with Forge Data Management API, remove the prefix "b." of the Id string and convert the rest to a Guid.
  • If you get the project Id with Forge BIM 360 API, just convert the Id string to a Guid.
folderId
Type: System String
Folder identity in BIM 360 to save the model. You can use one of the following methods to get this Id:
  • The folder Id string from Forge Data Management API.
  • The folder Id string from Forge BIM 360 API.
modelName
Type: System String
Model name in BIM 360 to save the model.

Remarks

Assumes that user is currently signed in BIM 360 and has access to Autodesk cloud services. This operation will create a model on cloud and then create a local cache of the cloud model. This method cannot be used when current document is already in cloud.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException folderId is an empty string. -or- modelName is an empty string. -or- modelName cannot include prohibited characters. -or- Thrown when the input BIM 360 account Id or project Id is invalid or unmatched.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions ForbiddenForDynamicUpdateException SaveAs may not be called during dynamic update.
Autodesk.Revit.Exceptions InvalidOperationException The document does not allow worksharing to be enabled. -or- This Document is a workshared document. -or- Saving is not allowed in the current application mode. -or- This Document has is in an edit mode or is in family mode. -or- This Document is not a primary document, it is a linked document. -or- SaveAs is temporarily disabled. -or- This Document is cloud model, cannot be saved as cloud model. -or- There is a transaction phase left open (such as a transaction, sub-transaction of transaction group) at the time of invoking this method.
Autodesk.Revit.Exceptions RevitServerCommunicationException Could be for any of the reasons related to network.
Autodesk.Revit.Exceptions RevitServerInternalException Failed due to there is a model in cloud under the project with that name. -or- Could be for any of the reasons that saveAs fails with RevitServerInternalException.
Autodesk.Revit.Exceptions RevitServerUnauthenticatedUserException User is not signed in with Autodesk id.
Autodesk.Revit.Exceptions RevitServerUnauthorizedException User is not authorized to access the specified cloud project.
[!:Autodesk::Revit::Exceptions::RevitServerUnauthorizedNativeException] You do not have cloud model entitlement to access this resource in cloud
[!:Autodesk::Revit::Exceptions::UnauthenticatedUserException] User is not authenticated to access the specified cloud project.

See Also